The US economy is growing, inflation has finally hit the US Federal Reserve’s 2% target and unemployment is quite low – and at an all-time low for African-Americans and Hispanics. For the first time in memory, there are more job openings listed by US companies than there are unemployed people. Such conditions usually foreshadow rising real (inflation-adjusted) wages, which would indicate that American workers, many of whom were left behind in the anaemic post-crisis recovery, might finally reap benefits from the strong economy.

Electoral models predict a strong economy favours the party in power and a weak economy dooms it to crushing losses. And yet, with the economy in its best condition in more than a decade, most polls show a substantial Democratic party lead in the run-up to the midterm congressional elections in November. Moreover, most political pundits predict the Democrats will take back control of the House of Representatives. And some even foresee a “blue wave” in which Democrats also retake the Senate, despite having to defend far more seats than the Republicans. In several recent special elections, Republicans have held on by far narrower margins than in past elections for the same congressional seats.

There are a number of plausible explanations for this anomaly. For starters, the pollsters and pundits could simply be wrong, as many were in the 2016 election. At the same time, Donald Trump may be hurting his and his party’s electoral prospects, especially among suburban women, by launching personal attacks against those who criticise him – including the basketball player LeBron James. And it is possible that, despite high ratings for his handling of the economy, many voters may not attribute the economy’s strength to Trump’s policies.

But another possibility is that the “economic effect” on elections no longer holds true. While economic distress may harm the party in power, economic strength might not help it as much as in the past. As voters become wealthier, more have the luxury of focusing on other issues.

In the Democratic primary election for New York’s 14th district earlier this year, the Democratic Socialist Alexandria Ocasio-Cortez trounced the incumbentrepresentative, Joseph Crowley, the fourth-ranking Democrat in the House. Clearly overconfident, Crowley barely even campaigned. Since then, Ocasio-Cortez has become a media darling, appearing alongside the Vermont senator Bernie Sanders, a self-described socialist who narrowly missed out on the Democratic presidential nomination in 2016. While much of the energy among the Democrats is on the far left, the party has made a point of selecting candidates with a real chance of winning in November.

It is possible that, despite high ratings for his handling of the economy, many voters may not attribute the economy’s strength to Donald Trump’s policies. Photograph: Rex/Shutterstock

Meanwhile, in the Republican primaries, candidates endorsed by Trump, or closely aligned with him, have tended to prevail. But Republicans do not currently have as much enthusiasm as Democrats, which may affect turnout among the party’s supporters in November.

Midterms are almost always a referendum on the president and his policies. In the 2010 and 2014 midterm elections, strong Republican majorities were viewed as a repudiation of Barack Obama. Accordingly, Democrats have been framing the midterms as a referendum on Trump. At the same time, Republicans have tried to make the midterms about Nancy Pelosi, the liberal House minority leader from San Francisco, who would likely return as speaker if the Democrats gain a House majority. The problem is that a potential speaker is a tougher target to hit than a sitting president, let alone one as persuasive in the media as Trump.

Midterm elections are almost always a referendum on the president and his policies

For now, attention is being paid to the economy’s potential role in the election. But after election day, the results will, in turn, affect economic policies – and thus the economic outlook. If Republicans retain the House and Senate, the pro-growth tax and regulatory changes enacted thus far will be sustained, and perhaps even expanded. Likewise, if they keep the Senate, conservative federal judges will continue to be confirmed.

By contrast, a Democratic majority in the House will predictably block Trump’s legislative proposals, and a Democratic majority in the Senate (a long shot) will stonewall conservative judicial appointees. Though divided governments sometimes produce policy compromises and preside over a strong economy, it is hard to imagine that happening if Democrats retake either or both chambers of Congress.

After all, even supposedly moderate Democrats have moved further to the left to ward off socialist challengers. And more Democrats are coalescing around an agenda of greatly expanded government spending and higher taxes (though they haven’t yet spoken much about the latter).

A widely circulated Gallup poll recently found a higher percentage of Democrats are amenable to socialism than to capitalism. Hence most of the Democrats veering to the left are proposing universal government-provided health insurance (“Medicare for all”), tuition-free college and a federal job guarantee or basic income.

Sign up to the daily Business Today email or follow Guardian Business on Twitter at @BusinessDesk

Of course, enacting that agenda would require a Democratic president and majorities in both chambers of Congress. And even then, it would cost tens of trillions of dollars. Paying for it would require a large European-style value-added tax or dramatically higher income and payroll taxes, most likely leading to European-style economic stagnation.

For their part, the Republicans are divided between traditional free-market, free-trade conservatives and Trumpian “economic nationalists” who want to restrict immigration and trade in lieu of concessions by the US’s trading partners.

So, after the November elections, the strong US economy may be threatened by an escalating trade war or the spectre of higher taxes. With growth slowing in China, Europe and elsewhere, the global economy will need America to avoid those dangerous policy mistakes.

Michael J Boskin is a professor of economics at Stanford University and a senior fellow at the Hoover Institution