Probably not the answer you are looking for, but the reference is shakesperean. a petard is "a small bomb used to blow up gates and walls when breaching fortifications" and has its origins in french.
The engineers/miners or 'sappers' would dig ditches to allow them to get close to or under the walls, set their petards and retreat.
sometimes, they didn't retreat fast enough. The 'hoist' part refers to them (or parts of them) being flung into the air by the resulting 'kaboom'
I've known many people who intended to injure others and got burned themselves.
I submit that this is the fate for most. even if you are successful in injuring others, there is a cost to that.