Bearing that in mind, I have no reason to believe a fully state-funded pharmaceutical system would be impossible, tied into healthcare. However, to make people complacent with that, it would have to be unbelievably transparent. Many people fear the idea of the state designing and providing them with drugs.
I'm also aware that there are all sorts of great medicines that have been invented and created and help people.
And, the economic incentives and distortions created seem detrimental.
Your allusion to the opiode crisis is actually a pretty non-trivial example. The opioid crisis is deeply connected to companies trying to push drugs into the market, get people addicted, and profit off of patents. Opioides are probably killing more people now than many other drugs combined are saving.
I could do without the entire profession of psychiatry for the most part, and the actually useful drugs - psychedelics - are being brought to market by a non-profit and are non-patentable by design. HTTP://Maps.org
I'm all for curious, creative and skilled scientists making drugs to help people - I don't like the side effects of the way the current economic system behind medicine works.