Approaching midterm elections and a growing battle over the party’s post-Trump identity heighten the political stakes of military action.