We do use it, sort of - pentobarbital is the current execution drug in many states. There was formerly a three drug cocktail used, pancuronium bromide as a muscle relaxant, sodium thiopental as an anesthetic, and potassium chloride to stop the heart. A European boycott made sodium thiopental scarce around 2011, so a switch to pentobarbital was made, then (as Duckster says) all three started getting scarce around 2012, so many states switched to pentobarbital as a single drug method of execution, often getting it manufactured in compounding pharmacies instead of imported.
As far as heroin, not likely to happen soon; if you think it’s difficult getting pentobarbital, try getting your hands on pharmaceutical grade heroin (actually don’t, it’s a figure of speech). It’s a schedule I drug with no legitimate medical use in the U.S. and totally illegal to import. However, due to shortages of other drugs Missouri just executed an inmate two weeks ago with midazolam and hydromorphone. Midazolam is a benzodiazapene and hydromorphone is an potent opiod narcotic better known under the trade name Dilaudid. That’s probably the closest you can get to the hypothetical heroin execution.