What's it called when an inventor's invention backfires on them?

https://midwest.social/post/11935785

What's it called when an inventor's invention backfires on them? - midwest.social

Is there a name for this specific concept? Where somebody invents something (to do them good) but then that thing turns around and backfires on them?

Hubris. Irony.
Might subcategorize, like “Frankensteinian irony.”
Or even Frankensteinian