Mr. Trump spotted opportunity in the injured dignity of the Republican base and the feckless irrelevance of the establishment’s agenda. He told Republicans shaken by the reality and risk of downward mobility that they were the only Americans who counted, and that they had been cheated and betrayed.

He promised never to cut their Social Security or Medicare, and expressed admiration for single-payer health care. He took their side against immigrant rapists, murderous jihadis, plundering trade deals, dangerous city people and disloyal, condescending elites of all parties and persuasions. He promised to use his billionaire superpowers to rig the economy to their advantage. It didn’t matter that he is a transparently corrupt, bigoted, sexually abusive, compulsive liar. He offered the dignity of recognition, promised to fight, and won.

Mr. Ryan, who had dreamed of building a more inclusive party, was sincerely horrified by Mr. Trump’s divisive white-identity politics. But there wasn’t anything he and the Republican establishment could do about it. They had nothing with which to fight the towering inferno of resentment they had kindled through their arrogant, ideologically driven indifference to the pressing needs of the people they claim to represent.

As soon as Mr. Trump clinched the nomination, Mr. Ryan became as tame as a poodle. Congressional leaders hoped that Mr. Trump’s need for political cover might make him tractable, and that unified government would enable them to finally set America on the path to broad-based prosperity through tax cuts, entitlement reform and the replacement of Obamacare with something no one had bothered to work out.

But the Republican majority was crippled from the start by the fundamental conflict between a government-shrinking agenda and the immediate material interests of Republican voters. Thus, the only thing Mr. Ryan has to show for his meekness in the face of Mr. Trump’s corruption and bigotry is an enormous tax cut that leaves the level of government spending basically untouched, except for interest payments on the debt, which the Congressional Budget Office now estimates will outstrip annual military spending in five years.

Meanwhile, Mr. Trump is bulldozing congressional Republicans into a mass grave. Democrats outnumber Republicans, so the latter depend on a sizable turnout advantage to win elections and sustain minority rule. But Mr. Trump’s brand of scapegoating demagogy, which Mr. Ryan as speaker has done nothing but enable, is a turbocharged Democratic turnout machine that converts swing districts into Democratic seats and converts enormous Republican advantages into razor’s edge contests. Barring a miracle, Republicans are going to lose their House majority, and even their Senate majority, once thought untouchable, is no longer safe.

So Mr. Ryan has cornered himself, and his party. The Republican base won’t buy what he’s selling, unless it’s awkwardly grafted onto white-identity populism, which is a self-annihilating strategy for mobilizing Democrats to the polls.

The forthcoming implosion of Mr. Ryan’s party, and his imminent retreat to Wisconsin, illustrates the danger of hidebound ideological overconfidence. Party elites in the grip of dogma can’t see the point of checking in with the people they represent and are blind to new problems the partisan catechism is not equipped to comprehend. If a decent Republican Party one day rises from the devastation Paul Ryan practically invited Donald Trump to inflict, it will be one that has stopped legislating for an imaginary world of self-financing tax cuts, having rediscovered and realigned with the basic interests of aging and working-class white suburban and rural American voters. It will take their woes seriously, and nurture their welfare, not their grievance.