This is the form of populism that got us into this mess. The war on drugs is the ultimate populism. Big sounding words used by people like Ronald Reagan to sell the US on a "war" it did not need that it has never even come close to "winning". Trump with his silly wall and caravans of Mexicans seems to continue to tap into the exact same populist sentiments.
The problem with opioid prescription drugs, is large pharmaceutical corporations exploiting deliberately manufactured loopholes in the same legislation that is used to wage the war on drugs combined with a dysfunctional medical sector. Turns out that if you rebrand heroin as Oxycontin and spend billions on marketing, lobbying, etc. you create an insanely lucrative market for getting people addicted to the stuff. Basically, South American drug lords are not the only ones profiting from drug trade in the US.
The US went way beyond legalizing this stuff and created an opioid crisis through a deliberate policy of helping big pharma produce, market, this stuff and getting doctors to prescribe the stuff and big pharmacy chains distributing the stuff. Turns out this is very profitable for everyone involved; politicians included.
The (simple) solution here is to 1) stop doing things that clearly don't work, have not worked for decades, and will never work, and stop pretending they will ever work. 2) copy successful policies from elsewhere where crime, murder, and addiction rates are significantly lower. It's actually pretty hard to do worse than the US is currently managing. You have to go to some pretty miserable places in the world to even come close in terms of murder rates and drug crime.
Europe, where I live, has drug criminality, homeless addicts, and plenty of misery as well. But it's on a vastly smaller scale than the US. Also, addiction to prescription drugs happens but generally doctors stop you getting addicted by having the sane notion of being aware that prescribing addictive medication can be actively harmful. The market for illegal prescription drugs is comparatively tiny and the legal market for that is heavily regulated. Most European countries indeed have policies for dealing with long term drug addicts that are centered around managing their addiction and stopping them from being a nuisance rather than simply locking them up. Which has never produced any positive results here either. Doing so is a combination of stupid and expensive.
The system is not perfect and prison populations in the EU are still dominated by people with addiction problems. It's just that the prison population is vastly smaller proportionally than in the US. We seem to manage without locking up single digit percentages of our population. Most of the success in reducing that population further in recent decades is directly connected to successful programs in places like the Netherlands, Switzerland, etc. to help long term addicts get off the streets.
Methadone programs have been around for decades and some countries indeed simply provide heroin for the absolute worst cases. It would be mistake to assume that you can just walk up to a counter and get some drugs just like that. That's a populist simplification. It doesn't work like that. You have to be pretty desperate to get in line for that kind of stuff. The typical users of these programs have a long history with addiction, crime and their lives are absolutely miserable. Frankly, anything that can get these people to improve their life in any way is a net gain and there have been a few cases of people regaining some level of dignity and then managing to kick their habit after decades on the streets. That's a nice bonus I would say, but not the main goal of these programs. The main goal is just reducing the impact these people have on the rest of us. If you supply drugs to a hard core drug addict, they don't have to go out and steal stuff to buy drugs. It's that simple. It works and solves a big problem.