The french used to use an explosive device called a “petard” (old french for a fart), that was used to breach doors. However these would sometimes blow back and kill the user rather than breach the door. This was the original intention for the Shakespearian phrase. One was Hoisted (old verb* not used anymore but essentially blown off their feet) by their own Petard (or door breaching bomb).
More information is here: https://en.m.wikipedia.org/wiki/Hoist_with_his_own_petard
*Unrelated to hoist as in to lift, despite similarities
Fair warning I haven’t read this specific article but an MIT prediction has societal collapse happening by 2040
https://bigthink.com/surprising-science/in-1973-an-mit-computer-predicted-the-end-of-civilization-so-far-its-on-target/