While I think this is self evident, it depends on your definition of "working."
If we - a I personally think we should - attach a social caveat to capitalism that requires we do what we can for people less fortunate, it fails miserably because we lack a mechanism for fostering unfettered profit while ensuring healthcare is available to all in a reasonable form. No such mechanism may exist, but I think the problem is we keep trying to shoehorn half measures into the current system and expecting a miracle.
In the case of intellectual property/technology you are mistaken. Patents have an expiration. Capitalists are provided a time limited monopoly for the sake of extracting rent in exchange for development of that technology. But after the expiration, it becomes public domain.
In this case, all of the drugs mentioned will eventually run off patent and be available in generic form for very little cost. Future generations will benefit considerably. This is where the moral argument becomes most powerful. Think of the potentially tens to hundreds of billions of people that will benefit from this in the future. Should we stop the pipeline of drug development because some people can't afford it today?
If there are better alternatives, why aren't other countries uses such a model? Why is the US _THE_ powerhouse, followed on by other highly market driven economies?
People "envision" schemes all the time. I prefer to live in a world where my drugs are real, not envisioned.
However, most if not the entirety of drugs is to cure disease and save lives (or significantly improve the quality of live). There is one market as opposed to a market each for the types of gadgets.
Which is why something as trivial as say a surgical equipment gets priced exorbitantly because without that there’s no “whole functioning gadget” (surgery).
The free market economy doesn’t work in this case.