The degree to which drugs such as opium and morphine should be controlled is a matter on which experts disagree. Solutions range from complete lack of regulation to criminality, but many experts suggests that there may be a happy medium between criminalizing what are sometimes described as "victimless crimes" and permitting unlimited access to potentially dangerous substances.
On the issue of criminalization, there are several problems, the most obvious being that it does not actually work. People persist in taking drugs that are illegal and reducing people's liberties and criminalizing an act that only harms the user is morally questionable. Also criminalization leads to an opportunity for drug cartels to rake in vast amounts of untaxed profits.
At the other end of the spectrum, most people would agree that one needs to control addictive substances to prevent harm to children. There should be age restrictions on the purchase of potentially harmful of addictive substances such as opioids, alcohol, tobacco, and marijuana simply because children are at an age where they still need to be protected from their own bad decisions by adults.
The next level of control needed has to do with international trade. Especially given that laws vary between different countries, controlling cross border flows of drugs is necessary for crime prevention and security.
All drugs, including medicines such as antibiotics as well as opioids, which cannot be used safely over-the-counter due to potential side effects or addictiveness, need to be regulated by prescribing mechanisms. Moreover, all drugs should be monitored for purity and safety, especially injectables which can be extremely dangerous.
From an economic perspective, the market for many drugs such as morphine and cocaine is quite substantial and controls should be in place to guarantee that sales are taxed and that part of the taxes go to fund addiction treatment and other harm mitigation programs, so that the cost of such drug use is not charged to more general revenues. The Purdue Pharma settlement and various settlements of lawsuits against tobacco companies are models for the idea that the sales of drugs or related substances should cover the costs of harm mitigation.