COUNCIL BLUFFS, Iowa — President Trump was energized. Fresh from the fight to confirm Brett Kavanaugh, he was firing up thousands of supporters at a rally by complaining about how Democrats had treated his nominee and how they may yet try to remove Justice Kavanaugh from the bench.

“They’re saying, ‘We’ll impeach him!’” Mr. Trump practically bellowed into the microphone here last week, his voice brimming with incredulity and righteous outrage. “Impeach him for what? For what?” The crowd booed on cue.

“Besides that,” Mr. Trump then added slyly, “I have to go first, right?” The crowd laughed.

Perhaps only in the Trump era would the prospect of being impeached become a punch line for the president of the United States. But after almost two years of living under the cloud of a possible impeachment, it may soon cease to be a laughing matter. While Democrats are largely ducking the topic on the campaign trail, few in Washington doubt that impeachment will be on the table if they win the House on Nov. 6.

If that happens, anyone who thought the battle over Justice Kavanaugh’s confirmation was ugly and divisive should buckle up, because history suggests it would provide only a small taste of what lies ahead. The impeachment drives against Andrew Johnson, Richard Nixon and Bill Clinton tore at the nation’s fabric, but an effort to remove Mr. Trump could lead to an even more incendiary conflict, thanks to the advent of social media and Mr. Trump’s brand of blowtorch politics.