From left, Pete Buttigieg, Sen. Bernie Sanders, Sen. Elizabeth Warren and Beto O’Rourke were among those demonizing businesses during this past week’s Democratic primary debates. (Brendan Smialowski/AFP/Getty Images)

There was a huge blown opportunity in the Democratic debates this past week.

Sen. Elizabeth Warren (Mass.) was asked why she called herself a capitalist — specifically, whether it was to reassure voters that she was “safer” — i.e. less radical — than her colleague Sen. Bernie Sanders (I-Vt.).

Here was a chance for Warren, a face of the party’s progressive wing, to say that yes, she believes in free enterprise — albeit with the rules set by government. Now, at last, she could endorse the role of profits (appropriately taxed, of course) as the inducement for investment that benefits all of society.

Instead, she went on a rant against Wall Street, CEOs and banks.

In capsule form, that’s where the Democrats are getting it wrong. To listen to two nights of debates filled with arcane policy disputes, personal sniping and some nasty attacks on former vice president Joe Biden, you would hardly know that America has a private economy.

Or, if you knew it, you would think that the economy was doing poorly (it isn’t). And you would think corporations were an alien menace, whose interests were 180 degrees against those of the people. But then, the only companies the candidates seemed to have heard of were allegedly amoral or even “criminal” — the familiar roster of oil drillers, Big Pharma and health insurers.

Anyone watching from Mars would have concluded that “profits” were a dirty word. To Warren, profits are “sucked out” of the system. To New York Mayor Bill De Blasio, they are “skimmed” off the top. To Sen. Kamala D. Harris (Calif.), Big Pharma is raking in profits “off the backs” of people. Apparently, no one earns money the way they used to, by keeping costs below revenues.

None of the “giant corporations” in the candidates’ universe invest in people, equipment and capital goods. No one talked about companies like the ones that most people see every day — that is, who are engaged in a relentless effort to lower prices.

Back in the day of Bill Clinton, John F. Kerry and Barack Obama — if feels like the late Pleistocene era — Democrats talked about jobs and growth. No more.

With the notable exception of former Maryland congressman John Delaney, who spoke approvingly of the “private innovation economy,” the candidates seemed unaware that the private sector is, ultimately, the source of the country’s wealth. That includes the wealth that is taxed by government to pay for vital social goods, including entitlements.

It isn’t so much that the Democrats are socialist. Most of them aren’t. It’s that they seem to have forgotten how our capitalist system works.

Again and again, candidates fumed over the fact that health-care consumers were socked with co-pays and deductibles. Well, goods and services carry a cost. It’s appropriate that people contribute.

Big Pharma has devised drugs that save lives and ameliorate suffering. Skyrocketing drug prices are fair game for regulation. But the notion that any profit earned on Pharma is immoral or antisocial is the product of delusional thinking, the delusion being that drug research is risk-free.

At least, Biden, Delaney and Sen. Amy Klobuchar (Minn.) recognized that “everything-free” is not a sustainable model. Montana Gov. Steve Bullock called it “wish-list” economics. It was refreshing to see Democrats warning of the incremental cost of Medicare-for-all (several cited a figure from a libertarian think tank: $32 trillion over a decade). Something of a sectarian split emerged over the affordability of prospective new entitlements.

But the private sector was scarcely mentioned — certainly not as the essential driver of growth. Since the economic recovery began in 2010, every one of the 21 million-plus new jobs occurred in the private sector. Public-sector employment was flat. (The absolute totals are 129 million private-sector workers vs. 23 million in the public sector.) It’s obvious where future growth will come from.

Even on trade, where President Trump’s policies are doing the economy real harm, most of the candidates blinked. Few were willing to comment on whether they would leave Trump’s steel tariff in place. (Kudos to former Colorado governor John Hickenlooper for saying flatly, “Trade wars are for losers.”)

There were few words uttered on revitalizing or stimulating the private sector. Most of the candidates’ prescriptions consisted of expanding opportunities for government assistance. That is good and in many cases necessary.

But it will merely redistribute. When more people learn software coding, get advanced degrees or start companies — even insurance companies — it expands the pie. What the Democrats were quarreling over was how to slice it.

The Trumpian view of the economic universe is zero-sum. The pie is fixed, so fight for your share, wall out the other guy. That was uncomfortably close to what we heard from Democrats. One of the favorite phrases in Detroit was “fighting.” Warren said, “I know how to fight.” Harris said, “I come from fighters.” Sen. Kirsten Gillibrand (N.Y.) said, “We need a nominee who will take on the big fights.” Economic expansion, actually, isn’t about fighting. It’s not zero-sum. You want your neighbor to prosper. In the real world, profits aren’t “sucked” out of the system as if by a giant vampire, they circulate and multiply.

The fixed-pie view requires one to fight, because the quantity of spoils is limited. Economics becomes not a response to incentives but a quest for transfers. Zero-sum means anyone getting rich is making you poor. Cue De Blasio’s threat to “tax the hell” out of the rich.

In the previous debate, in Miami, Warren sought to downplay the economy’s strength. She said it’s doing great for corporations but not for ordinary people, specifically adding, “It’s doing great for people who want to invest in private prisons,” but not for prisoners and their families, a disproportionate number of whom are African American and Latino.

Warren was right: Private prisons are a terrible idea. But they’re terrible for a reason. Prisoners can’t choose where they are incarcerated. And state correction officials may not care a fig about their quality.

But most other industries are not like the prison industry. If you don’t like the restaurant on your corner, you go someplace else. That sets up a powerful incentive for the restaurateur.

Of course, competition isn’t perfect. That’s why we need antitrust, and in some industries need it to be more vigorous. But most are a lot more competitive than prisons. To offer for-profit prisons as a model of what’s wrong with the economy suggests a willful blindness to how the private sector works.

“Giant corporations” are an old target. Once, when defending a railroad client, which opposition counsel mocked as a “soulless corporation,” Abraham Lincoln drolly responded, “Counsel avers that his client has a soul. This is possible. . . . But our client is but a conventional name for thousands of widows and orphans whose husbands’ and parents’ hard earnings are represented by this defendant.”

Corporations employ millions of people, they do much good and, sometimes, like other human institutions, they do ill. To indiscriminately blame them is demagogic.

Democrats are running out of time to recognize that corporations and other agents of the private sector aren’t an afterthought, or primarily an agent of what ails the economy. For most people, they are a livelihood and the country’s future.