https://en.wikipedia.org/wiki/Hoist_with_his_own_petard
“Hoist with his own petard” is a phrase from a speech in William Shakespeare’s play Hamlet that has become proverbial. The phrase’s meaning is that a bomb-maker is blown (”hoisted”) off the ground by his own bomb (”petard”), and indicates an ironic reversal or poetic justice.[1]
Yep, that is what I meant — poetic justice.