"The best way to protect people from overdosing on illicit opioids " is to provide them with clinically pure licit opioids of known composition and potency.  Helping people get off their addictions is a long-term project, and nobody can "get off their addiction" if they don't live long enough. Providing clinically pure drugs is a way of ensuring that addicts live long enough to deal with their addictions.