A SPECTER haunts progressive America — the possibility that a company might make too much money solving the world’s coronavirus crisis.

At the last Democratic debate, Bernie Sanders called the leaders of the pharmaceutical industry “a bunch of crooks,” who are telling themselves in the midst of the epidemic, “Wow, what an opportunity to make a fortune.”

Op-eds have sprung up warning, “Drug Companies Will Make a Killing from Coronavirus” (The New York Times) and “How Big Pharma Will Profit From the Coronavirus” (The Intercept).

This would seem the least of our problems right now, but the pharmaceutical industry is such a ­boogeyman that it gets roundly ­attacked even while racing to provide a boon to public health.

Bernie’s view that drug-company executives are “crooks” ­betrays his Marxoid belief that profit is a form of theft. Of course, even people who aren’t socialists are scourges of the industry. Pharma brought much of this on itself with the opioid debacle. Yet these companies routinely create medical miracles.

Yes, they make money doing it, but the profit motive is the reason why they exist in the first place. There’s a reason the United States introduces more new therapies than any country in the world.

When faced with what has been called a once-in-a-generation pathogen, would we rather have a robust commercial drug industry or not? Brilliant, creative people scattered throughout companies and universities working to be the first to a solution or not? Investors looking to back promising research, or not?

If your answer to any of these questions is “no,” you are probably a socialist, a populist firing at the wrong targets or someone ­incapable of doing basic cost-benefit calculations.

As Chris Pope of the Manhattan Institute notes, if a new drug — even an expensive one — obviates hospital stays and physician care, it can reduce health-care costs over time.

Consider the current crisis. The costs of the “medieval” methods we are using to try to control the coronavirus virus are unimaginably high — shutting down swaths of the economy and throwing millions out of work. Gross domestic product could drop 10 percent or more this quarter.

What would we pay for a vaccine to render all this needless? Even if it were a trillion dollars, the price of the Trump-proposed stimulus package, it would be a bargain.

That said, the price for a vaccine probably won’t be exorbitant. The nightmare stories of ungodly ­expensive treatments usually ­involve drugs for rare diseases ­affecting a small number of people. This is different. There is a vast pool of people who will want the coronavirus vaccine.

The overall picture of prescription drugs is more complicated than advertised. Once new drugs come off patent, cheaper generic drugs arrive. This is why per-capita spending on traditional drugs has been declining.

As for patents, the point of them is, as the Constitution puts it, “to promote the progress of science and useful arts.” They ensure that companies get the benefit of ­research that is expensive and risky. Even in the best circumstance, after perhaps spending $2 billion on ­research, a company may wait a decade for federal approval.

If a company doesn’t have a period of protection for its intellectual property when it can reap the market benefits, much of this research would dry up. And who is going to step up and fill the gap?

It is a marvel that the National Institute of Allergy and Infectious Diseases is already working with a Cambridge, Mass., company, Moderna, on a vaccine trial. This is a model of public-private cooperation. Anyone who would want to subtract Moderna from the process because it stands to profit is an ideological zealot heedless of public health.

This crisis brings home the ­incalculable value of a world-class pharmaceutical sector. We can continue to shelter in place — or hope that the “crooks” pursuing breakthrough drugs and treatments make the current disruptions in our national life completely unnecessary.

Twitter: @RichLowry