There are people who function normally in life while using opioids. Both prescription pills, and street drugs. Obviously, long term impact from opioid use is bad, but we allow people to do all sorts of things to themselves that kill them over the long run. One of the biggest we market to kids from a young age - sugar.
The biggest acute risks from drug use are largely overdose related. Having ready access to narcan solves some of it. But issues with actual potency being incredibly unreliable are another huge risk factor that kills a lot of people, and regulated and tested drugs solves that.
Legalization makes huge headway on the acute overdose related risks. It doesn't solve all of the issues, but neither has criminalization and prosecution. I am skeptical of societal taboos doing it either, because I have seen people in my life fall into opioid addiction, and all of them were ashamed about it. I have spoken to people on the street about it, and they're ashamed to be living in tents with any money they come into going straight into more drugs. It's anecdotal, obviously, but it has been so universal that I find it incredibly unlikely that piling more shame on top of people who are already deeply ashamed of their current state in life is going to force any significant number to suddenly clean up their act.
Portugal's use of hard drugs increased at a lower rate compared to the rest of Europe post decriminalization. Obviously decriminilization is not the same as legalization, and there are other demographic factors in play, but I don't know that we have any evidence that suggests the usage of fentanyl, etc. is going to rise based on being decriminalized or legalized. This very article says that the destigmatization has no resulted in higher drug usage than in places where it is still stigmatized and laws are highly enforced.
Opioids aren't like pot or hallucinogenics or even cocaine - there's no glamour associated with them, at least not since the opulent opium dens have long since been shuttered. People can and do use them while functioning, but people mostly fall into addiction through not being able to get off of opioid based painkillers after having been prescribed them, or by their life falling apart to the point where they are medicated to an extreme extent. Will there been individuals who use if it is legalized that wouldn't otherwise? Of course. Will it be in significant quantities? I don't believe so, and don't believe there is any evidence to suggest that this would happen. The question is if the benefits can outweigh the downsides and result in overall harm reduction.
> But wouldn't that issue largely go away if there were regulated legal avenues for obtaining drugs?
No. If a drug is too powerful to be used responsibly, legal access won't make that issue go way.