Recreational drugs are not inherently any more dangerous than the chemicals produced for medicinal use. They are the same kind of thing, recreational drugs just happen to be used for, well, recreation.
Some recreational chemicals are even less dangerous than drugs you can get OTC. For example, LSD has a stellar safety record. There are no recorded overdoses on it, and no known long term physical side effects. It is impossible to get addicted to LSD, because frequent use builds up a massive short term tolerance extremely quickly.
Contrast that with acetaminophen. It is widely and cheaply available, overused by a large number of people and it does some serious damage to your liver. You can also overdose on it.
Also, the pharmaceutical industry already produces many chemicals that are used recreationally, like opiates, benzodiazepines, amphetamines(including methamphetamine), various other stimulants, ketamine, DXM etc.
Infact, the only class of popular recreational compounds they don't produce happen to be the comparatively much safer psychedelics including tryptamines, phenylethylamines and lysergamides.