One correction: many opiate users, yes, even heroin users, can be functional members of society. There are many folks you would never know use H, at least until they accidentally get some fentanyl and die.
Same thing with meth(which is actually a prescription medication). I'll say that there is always a very high probability that some life stress transforms a casual usage pattern into full-blown addiction though. I've seen it first hand with a family member who used meth for years "on the weekends, to get things done" until some stress in their mid-40s turned them into a hallucinating IV meth user.
More or less though, I think we should maintain criminalization of public usage of most drugs, but I'm open to whatever pragmatic approach maximizes public health and safety while lowering crime.