The Republican Party is in deep trouble for the 2018 midterm elections, less than a year away. All of the signs point to a “wave” election for Democrats, in spite of the booming economy and high consumer and business confidence.

The Senate is likely safe — the Republicans only have eight seats at stake, as opposed to Democrats’ twenty-five. But the House is now in real danger, especially with a repeat of 1992’s “Year of the Woman” on the horizon.

Some factors are completely beyond Republicans’ control. Historically, the sitting president’s party almost always loses seats in the midterm elections.

Add to that the fact that the president won the election while losing the popular vote, and the stage is set for a major backlash that has nothing to do with his performance in office. From the day he took office, the “pink pussyhat” brigade has been waiting for its moment to take revenge for Hillary Clinton’s loss.

Other factors are entirely the GOP’s fault. It is almost cliché by now to observe that after more than six years of promises about what Republican control of Capitol Hill and the White House would mean, the GOP has failed to deliver on its legislative agenda, particularly on repealing Obamacare and controlling federal spending.

If Congress approves some kind of immigration amnesty — a so-called DACA “fix” — that could only add insult to injury.

Tax reform will help, but will not make up for the disappointment. Midterm elections depend on the degree to which the opposition is organized and energized, far more than the degree to which supporters of the governing party are satisfied with its performance.

And while much of what the so-called “resistance” believes is pure trash — the Russia conspiracy theory, for example — it has, with the media’s help, been shaped into a coherent narrative.

Then there is the ongoing furore over sexual harassment, which has crystallized in the Alabama Senate race (whether the allegations are true or not). The problem is bipartisan, and Democrats are arguably bigger offenders, given the sheer scale of the scandal in liberal Hollywood and the media. But Republicans are the party in power, and so they will be the targets of public outrage for any problem attributable to both sides of the political spectrum.

Republicans have two factors in their favor.

One is the congressional map, which still favors the GOP after Barack Obama foolishly pushed Obamacare through Congress in 2010, a Census year. Democrats’ enthusiasm will still be largely confined to the districts where they already do well.

An increasing number of Republican-held districts are in play, but Democrats will have to win almost everywhere to find the 24 seats they need to take back the House.

The other factor is Nancy Pelosi. She has clung to power in her dwindling caucus even after leading her party to one historic defeat after another. Republican memories of her time in office are still fresh: “We have to pass the bill so that you can find out what is in it,” and all the rest. There are questions about her mental competence — unfair, perhaps, but widely shared.

Democrats would be wise to dump her, but cannot do so in the “Year of the Woman.”

Yes, it is theoretically possible for Republicans to come back in 2019 with bigger majorities — especially in the Senate, where ten Democrat-held seats are up for grabs in states that Donald Trump won.

Realistically, however, the best the GOP can hope for is to limit the damage.

It will need to deliver on its promises, to warn voters about Pelosi, to take the lead against sexual harassment, and — perhaps most of all — to recruit more female candidates.

Joel B. Pollak is Senior Editor-at-Large at Breitbart News. He was named one of the “most influential” people in news media in 2016. He is the co-author of How Trump Won: The Inside Story of a Revolution, is available from Regnery. Follow him on Twitter at @joelpollak.