Fentanyl is the drug for effect, but it's being sold as a cheap alternative to heroin, or as counterfeit heroin. Unfortunately for users, the effect is short-lasting and it is about 30x as potent, so it is difficult to for them to dose properly. The traffickers like it because many more doses fit into a small space.
I'm not sure I believe that making heroin legal and available for "recreational" use would solve the problem. People who propose it usually say that it's working in another country (such as Portugal), but then you look at that country and it's not really legal or available, it's just that they do not jail people for personal use anymore. I can agree with that, but it doesn't solve the trafficking problem. The only way to get rid of trafficking is to either allow people to easily buy it legally without onerous taxation, or to reduce demand to zero. If you do the former, you will still be stuck with lots of addicts, the associated crime and suffering, and probably many overdoses. Most likely, the number of addicts will increase, as they did with OxyContin, Actiq, etc. Worth mentioning that Actiq is fentanyl and it was in demand.
Reducing demand is a multifaceted problem with complicated solutions, many of which are politically unpopular.
Interestingly, some drugs can simply be taken off the market and the demand plummets. Quaalude is one example. Nobody stepped in to make an illicit version and the users probably just stopped using or switched to benzodiazepines and then hopefully stopped those. Unfortunately, it seems like we have a persistent demand for opioids.