Your claim is factually incorrect. The issue here is specific, purposeful, anticompetitive behavior.
You have someone like Jonas Salk who basically fit your example perfectly, except he decided to share his invention with the world instead of hiding it away as per your example.
You're free to not share your cure with the world, no one could force you, but I would question the motivations of someone who chose not to.
The ridiculous price has little to do with the original inventor.
A not stupid regulatory system would evaluate the value of the improvement to the market (likely hugely negative in this case). The idea wouldn't be to deny the company the right to the patent, it would be to deny regulatory approval for the patented version of the device.
(the argument being that decreased access to the patented device costs more than the benefit provided by the minor safety improvements it offers).
I'd take my systems stupid and simple, please.
They would of course argue that this confuses the marketplace. But they are sitting there exploiting the confused marketplace, so not much of an argument to be made along those lines.
Something changed in ths mid-90s. Neoliberalism became salonfähig, or something.
The problem with your type of logic is illustrated best not by the complicated reality, but (as usual with philosophical problems) a corner case. Imagine that I invent a fantastic new medicine - and being an evil genius, leave it in my lab, never announcing it to the world, knowing perfectly well that millions of people around the world could be saved if I did.
In your logic, this absence of action makes me evil - although these poor sufferers would suffer just the same if I didn't invent this new medicine to begin with. The same is true for EpiPen: it's their inaction you condemn, not action.
The medical industry is not making the world a worse place through it's actions; it just isn't doing it a better place to an extent that you would want them to.