For nearly three years, Democrats were certain they would eat President Trump’s lunch in 2020. The 25 dreamers seeking the party’s nomination are testament to the conviction that one of them definitely would be the next president.

Oops.

Suddenly, after just two debates, the Nervous Nellies are climbing the walls. Many Dems are worried that the battle is too nasty and too negative, and that the front-runner, Joe Biden, is looking awfully ­wobbly.

Equally worrisome, Biden’s strongest challengers, Sens. Elizabeth Warren and Bernie Sanders, are leaning so far left that their appeal could be limited to the most radical elements. Some of their supporters are even attacking the sainted Barack Obama.

What to do? My modest suggestion: Panic!

All three top contenders are looking like losers in a general election. Here’s why, starting with Biden.

Years ago, in a discussion about how hard it is to get elected president, the late Democratic Sen. Daniel Patrick Moynihan offered an example. Bob Dole, his friend and Republican colleague, was so perfectly qualified and would have been chosen as prime minister in a heartbeat if America had a parliamentary system, Moynihan insisted.

The discussion took place after Dole was crushed by Bill Clinton in the 1996 presidential race. Dole was his party’s grand old man when he got the nomination, having been in the House and Senate for a combined 35 years.

He was the vice-presidential nominee in 1976, when Jimmy Carter defeated Gerald Ford, and sought the top spot in 1980 and 1988 before dropping out.

A World War II hero who was seriously wounded and awarded two Purple Hearts, Dole finally got his turn at age 73, but lost in a landslide.

Dole, now 96, is long retired, but his political doppelgänger — Biden — seeks one last hurrah. Biden at least got to be veep, thanks to Obama’s popularity.

But in fundamental ways, he and Dole are alike. Creatures of the Senate — Biden was first elected when he was 29 — and successful in navigating its rules and relationships, they are the products of their parties and their times. Neither man was designed to be the people’s choice.

Biden, at 76, is making his third run for president and leads the field, thanks to the ridiculous number of candidates and the gauzy perception that he can unite the party and defeat Trump. But alarms are going off about his staying power after the first debates, and the best that can be said is that he survived.

The big problem is that Biden is trying to be somebody he’s not and the clumsy effort is magnifying why he was never a successful national candidate on his own. Once a gaffe machine, always a gaffe machine.

He is running as fast as he can to keep up with the party’s mad sprint to the left. Yet with even Obama fair game for the off-with-their-heads revolutionaries, Biden can’t possibly satisfy their bloodlust.

To do so, he would have to ­renounce most of his record and embrace the socialist-style changes the far left demands while also convincing the working-class voters who swung the 2016 election to Trump that he’s with them. Few people could pull off the straddle, and Biden isn’t one of them.

Yet as frightening as Biden’s performance is to many Dems, Warren raises even more scary scenarios.

The debates confirmed that she is a hard-edged, big-government ideologue to the core. She is eating Sanders’ lunch while aligning with him on “Medicare for All” and other issues that aim for a wholesale remaking of America. They rail against corporations, from oil to banks to pharmaceuticals, with a strident militancy.

But where Sanders looks like a flailing, angry old man who had his chance in 2016, Warren speaks with controlled fury and precision. She has a skilled lawyer’s command of her theory of the case, and there is no wasted energy in her assassin-style delivery.

Neither is there any joy. Her language choices are sometimes lurid, as she repeatedly claims that insurers and other giant companies are “sucking money” out of the middle class. She displays equal contempt for business and the Dems who fault her radicalism, saying the party cannot be one of “small ideas and spinelessness.”

She is a true believer — and that’s the problem. It’s a risky approach, which is why former Maryland Rep. John Delaney led the group trying to talk sense at last week’s debate. He said the “free everything” promises of Warren and Sanders “will turn off independent voters and get Trump re-elected.”

He went on to cite the examples of George McGovern, Walter Mondale and Michael Dukakis. All three went left — and all three lost in landslides.

The fear that Warren is wrong for the moment is especially reasonable given the Electoral College. Her job-killing policies would make it hard for her party to win back those voters who enabled Trump to flip Pennsylvania, Wisconsin, Ohio and Michigan.

Indeed, Warren could be such a turnoff that swing House and Senate races would go red, with the GOP taking Congress and the White House.

Some of the party’s fear could get clarified at the next debate, where the Biden-Warren showdown will be the main attraction. Because 20 qualifying candidates were divided over two nights for the first rounds, they have never been on the stage together. That will change in September, when the field is pared to one group.

Given Biden’s poor performances so far, I expect Warren will aim to shred him — as will Sanders, Sen. Cory Booker and most of the others. Either Biden or Warren needs to be hobbled before an alternative can emerge.

Warren is a better debater than Biden, and while she and Sanders are friends, she and Biden are decidedly not. Adding personal animosity to their differences could make for a combustible and defining event.

Until then, the party and its leaders can only hope for a miracle. Which tells you why more and more Dems are joining the long-shot effort to impeach Trump.

After watching the debates, it’s their new Hail Mary.

Purely a pragmatic politician

My reports about the late Ed Koch working with Republicans to get things done for New York struck a chord with reader Steven Schiff. He writes: “Unlike today’s ‘liberals,’ Koch didn’t demand ideological purity. He used to repeat something to the effect that ‘If you agree with me on 7 out of 10 issues, you should vote for me. If you agree with me on 10 out of 10, you should have your head examined.’

“I miss him.”

We’re AOC-ing her demons

What have they done with Alexandria Ocasio-Cortez? Has an imposter seized her office?

The two top aides who helped define her as an outsider willing to crash the party are quitting, and one left immediately.

Yet AOC supposedly texted that it’s no big deal.

Somewhere, Nancy Pelosi is doing a victory dance.