I think hanging is more complicated than you think. In a lot of these places there’s one execution every few years and people just don’t have the expertise they used to have in the Middle Ages! !And a hanging going wrong is definitely “cruel and unusual punishment” under the Constitution.
One complication is that a doctor cannot attend an execution. They certainly cannot inject poison into someone’s veins. Even if the doctor is only there to pronounce the person dead, if things don’t go as planned, she would have an ethical duty to try to revive the person.
So lethal injection is carried out by people with no training in giving injections, with drugs that might not be the first choice because as noted above manufacturers might not want to sell them. Moreover, some of the sedatives used in surgery in the US come from Europe and it’s illegal to export drugs for executions. We had a scenario a few years back where a state was using a European drug for executions and the EU prohibited additional exports to the US, and there were shortages of the drug for normal medical use. I think they got the state (possibly TX) to back down so they could resume supplies.
The reason these new methods are coming about is that one by one the old ways are being eliminated due to extremely dedicated legal advocacy.