Remember the great penis scare of the 1990s?

Due to environmental toxins, sperm counts were in free fall, and the world was doomed.

Scandinavian researchers discovered that a nearly 50% decline in sperm counts had taken place over the last 50 years, probably because of “endocrine disruptors” that are everywhere in our poisonous, chemical-infested modern world, and Greenpeace used the study for fundraising under the slogan, “You’re not half the man your father was.”

Moreover, the penis was suddenly at increased risk of deformity: It was reported that there had been an explosion in instances of hypospadias, a common birth defect in which the urethral opening is in the wrong place on the penis.

Since we have to be terrified of something at all times, new fears have sprung up to replace the old ones.

Except none of the above was happening. Scary sperm-count studies have gone limp. A meta-review of 35 sperm-quality studies conducted in 2013 found that eight studies encompassing a total of 18,109 men found a decline in sperm quality, whereas 21 studies involving 112,386 men showed either no change or an increase in sperm quality.

Newspaper editors and TV producers quietly let the issue fade away without apology. Oh, and a 2009 report on the hypospadias data concluded, “the bulk of evidence refutes claims for an increase in hypospadias rates.”

So much for the great dong doom dirge.

The penis scare took its place alongside the DDT scare (banned in 1972, it was later found to be as carcinogenic as coffee by the International Agency for Research on Cancer), the overpopulation scare (in fact, the population is leveling out and will actually start to decline in about 50 years), the famine scare (despite a doubling of the world population since 1968, world food production has tripled, and today both Pakistan and India have so much grain that they export some).

But since we have to be terrified of something at all times, new fears have sprung up to replace the old ones: Now we’re worried about global warming, genetically modified food, vaccines and that old standby, cancer. (Cancer rates have fallen precipitously, while survival rates are way up.)

Meanwhile, as science journalist Ronald Bailey writes in “The End of Doom: Environmental Renewal in the Twenty-first Century” (Thomas Dunne Books), massive improvements in virtually all areas of human endeavor have simply gone ignored.

If there were a musical theme to what’s actually been happening to the world in the last 50 years, it wouldn’t be “A hard rain’s a gonna fall” but “Getting so much better all the time.”

Bailey has been trying to talk humanity off the ledge for more than two decades, and people won’t forgive him for it. When, in 1992, he brought to his editor an idea for a sober, evidence-based book about how humanity copes with environmental challenges, the editor replied regretfully, “Ron, we’ll publish your book and we’ll both make some money. But I want to tell you that if you had brought me a book predicting the end of the world, I could have made you a rich man.”

Environmentalist groups are, of course, in the same business as the folks who brought you the “Saw” movies. Their fundraising depends on it, and the media rarely go back to fact-check past predictions, instead blustering ahead with the next dire warning.

Bailey doesn’t claim that global challenges simply resolve themselves — although, as we have seen, some scares were fictitious, based on junk science to begin with.

The doomsayers simply never account for the role of human cooperation and ingenuity in confronting challenges. Remember the hole in the ozone layer? Chlorofluorocarbon refrigerants apparently floated up to the atmosphere and were eroding the protective ozone layer over Antarctica.

Some scares were fictitious, based on junk science to begin with.

Bailey believes apocalyptic forecasts were off-base, but after an international treaty phased out the CFCs, French researchers reported in 2013 that the ozone layer is recovering.

So will global warming, a much more complicated issue than CFCs, be resolved by cooperation or ingenuity? Ask yourself which science has seen more breakthroughs in the last few decades — political science or technology.

Politicians issue fatuous warnings about the dangers of global warming, which they vow to combat with even more absurd fantasies about immediately de-carbonizing the economy.

Back in 2008, Al Gore urged America to “commit to producing 100% of our electricity” from renewables within 10 years. It’s seven years later, and solar, geothermal and wind energy are providing 5% of our power.

Renewables will start to take over when their costs fall below the price of fossil-fuel based energy. It’s as simple as that. Solar energy, on current trends, could be as cheap as $24 per megawatt hour in a decade. That is far cheaper than the forecasts for fossil fuel costs.

Stanford tech guru and entrepreneur Vivek Wadhwa said last year that “there is little doubt that we are heading into an era of unlimited and almost free clean energy” thanks largely to the coming breakthroughs in solar.

For climate-change hysteria, that would be catastrophically good news. Bailey doesn’t wholly share Wadhwa’s optimism. But he adds, “Wagering against human ingenuity has always been a bad bet.”