You lump in cocaine as though all schedule 1 drugs are equal. You are having two different conversations. One of them is complicated (why are LSD, peyote, and marijuana classified with opioids? why are they enforced and punished so unevenly along race and class lines?)
Opioids are critical medical tools for pain management. The solution is to have doctors decide when it is necessary and to have pharmacists manage its distribution. Why this works is that doctors and pharmacists will be delicensed and possibly go to jail for this, and they generally have a highly asymmetric amount to lose from doing so.
Opioids are unlike any other drug. Look at national death statistics. Read this article. If they weren't so necessary for critical pain management and hospice care they'd be completely illegal.