Americans prefer divided to unified government, and voters have historically punished the incumbent party in midterm elections. To these historical trends we can add Donald Trump’s relentless antics and his rude defiance of presidential norms, which have rankled nerves and generated bad blood.

So all told, the president’s party deserves to lose one or both chambers next week, right? Wrong.

At stake Tuesday is legislative power, and on that count congressional Republicans have earned the right to retain their majority, while Democrats have proved themselves unprepared for governance. The GOP has navigated the nation through the Trumpian minefield, while Democrats spent the time chasing after Russian pee-pee tapes and lionizing porn stars.

Start with the GOP side of the ledger. Thanks to unthanked House Speaker Paul Ryan, Trump has two major legislative accomplishments under his belt: The individual mandate — the least popular element of ObamaCare — is gone. And Ryan’s tax overhaul slashed the corporate rate to 21 percent from an eye-watering 35 percent, which had long discouraged investment and hiring.

The tax cut, combined with Trump’s war on regulatory bloat, has yielded strong growth. Lefty economists who predicted prolonged stagnation look not a little foolish these days. Consumer spending, capital investment and exports are all up. Unemployment has plummeted below 4 percent, and according to the Federal Reserve Bank of St. Louis, for the first time on record, job openings outstrip the number of the unemployed seeking a job.

The result: Wednesday’s news that US wages and salaries had risen 3.1 percent in the third quarter — the highest jump in a decade.

Nancy Pelosi sneers that such jobs numbers “mean little.” She can afford to do that. American workers can’t afford to put her in charge of the economy.

Then there’s the Senate, where Majority Leader Mitch McConnell has made it his singular mission to confirm the president’s nominees to the federal bench. Much of our present discord traces back to liberals altering the moral landscape of the country by judicial fiat. The judges nominated by Trump and confirmed by McConnell could offer a much-needed rebalancing to our constitutional structure and help lower the temperature in the long term.

Now turn to the Democratic side of the ledger. After 2016’s drubbing, Democrats could have re-examined their agenda. They could have gone back to the drawing board. They could have — but they didn’t. Instead, they resolved to undo the outcome of a legitimate election. Each week brought a fresh conspiracy theory or a new savior on whom liberals could pin their hopes of unseating Trump.

Christopher Steele. Michael Wolff. Michael Avenatti. Stormy Daniels. Some Maltese professor who had the goods on Trump’s alleged vulnerability to Russian blackmail. These and numerous other unsavory characters had their 15 minutes before sinking back into anonymity or third-rate celebrity. Trump stayed put.

Democrats also fell into every cultural trap that Trump set for them, seemingly determined to prove his point that they are the party of hard-left identity politics and hatred for the “deplorables”: From the pussy-hat resistance, which embraced the anti-Semitic loon Louis Farrakhan, to DNC deputy chairman Keith Ellison’s promotion of the violent thugs of Antifa, to Elizabeth Warren’s 1/1024th Native heritage, and much else of the kind.

Note, too, that elected Democrats refuse to speak out forcefully against the caravan, though as a policy matter it’s a no-brainer, and stating the obvious would inoculate voters against some of the more fevered Trumpian talk about an invasion. The silence suggests a party beholden to a borderless ideology that has zero purchase with broad swaths of the country.

And what, really, is the Democratic electoral message to voters? Fairly or not, for many voters it has come to be summed up in Hawaii Democratic Sen. Mazie Hirono’s primal scream: “I just want to say to the men in this country, just shut up and step up. Do the right thing, for a change.”

That statement came amid the Brett Kavanaugh confirmation battle — Exhibit A in the case against handing Democrats legislative majorities. Voters shouldn’t soon forget what Hirono and her colleagues attempted to do to Justice Kavanaugh. For several hellish weeks, no allegation was too baseless or implausible to air in the prestige press. If this was how Democrats conducted themselves in the minority, imagine what they would do with committee chairmanships.

No doubt many Americans wish Trump would tone down some of his rhetoric, particularly in the aftermath of Pittsburgh. I’m one of them. But Trump’s Twitter account isn’t on the ballot Tuesday.

Nor are the cable-news shouters, pro- and anti-Trump, whose foghorn voices pierce the airwaves. Nor, finally, is the broken state of our culture, which won’t be healed anytime soon and certainly not at the polls.

Sohrab Ahmari is senior writer at Commentary and author of the forthcoming memoir of Catholic conversion, “From Fire, By Water.”