Some House Republicans have already learned that the hard way. When Representative Francis Rooney, who represents a deep-red district in Florida, said he “could not rule out” voting for impeachment, Mr. Trump and his Republican allies created such an uproar that he announced his retirement within days.

Representative Mark Amodei, Republican of Nevada, who said he agreed with a Democratic senator that Congress should “follow the facts,” was forced to explain himself to the Trump campaign’s political director, House Republican leaders and the acting White House chief of staff. Then he walked back his words.

Other Republicans, including Mr. Hurd, are heading for the exits. On Monday, Representative Peter T. King, Republican of New York, became the 20th Republican to say he will step down at the end of the term. Some are tired of being in the minority and of having to defend Mr. Trump.

“These members saw what happened to Jeff Flake in Arizona,” said David Wasserman, who analyzes House races for the nonpartisan Cook Political Report, referring to the former senator and Trump critic who declined to seek re-election last year. “As soon as he became critical of Trump, his approval rating plummeted among Republicans and didn’t get much better among Democrats. The result was that he had no base to run for re-election.”

That appears to be the case for Mr. Hurd, one of just three House Republicans representing districts won by Hillary Clinton in 2016 (the others are John Katko of New York and Brian Fitzpatrick of Pennsylvania). Mr. Hurd, the House’s lone black Republican, is not running for re-election, but he has talked of a possible White House bid in 2024 and is hoping to expand the party’s tent.

Polls show that the public is split on impeachment largely along party lines. A New York Times/Siena College survey last month found that in the six closest states carried by the president in 2016, registered voters supported the impeachment inquiry by a five-point margin, 50 percent to 45 percent. But the same voters opposed impeaching Mr. Trump and removing him from office, 53 percent to 43 percent.

“I look at this kind of like the Kavanaugh hearings,” Mr. Newhouse said, referring to the partisan battle last year over confirming Justice Brett M. Kavanaugh, who faced allegations of sexual assault but ultimately prevailed on a mostly party-line vote. “Both sides are going to put out their best stuff and everybody’s going to end up where they began.”