"Hoist by your own petard" is an expression that made me want to know today what the heck a "petard" was. Wikipedia informed me:
The device was extremely dangerous to employ and hence the meaning of "hoist by his own petard" -- to be harmed by one's own evil- or well-intentioned devices.
Delightfully enough, the word finds its roots in "the Middle French, peter, to break wind."
So being hoist by your own petard may be a little like farting under the covers: There can be a sense of relief, but there is a price to pay.