By the summer of 2017, Dave Trott, a two-term Republican congressman, was worried enough about President Trump’s erratic behavior and his flailing attempts to repeal the Affordable Care Act that he criticized the president in a closed-door meeting with fellow GOP lawmakers.

The response was instantaneous — but had nothing to do with the substance of Trott’s concerns. “Dave, you need to know somebody has already told the White House what you said,” he recalled a colleague telling him. “Be ready for a barrage of tweets.”

Trott got the message: To defy Trump is to invite the president’s wrath, ostracism within the party, and a premature end to a career in Republican politics. Trott decided not to seek reelection in his suburban Detroit district, concluding that running as an anti-Trump Republican was untenable, and joining a wave of Republican departures from Congress that has left those who remain more devoted to the president than ever.