A thought came to me today, after someone on another board mentioned H.P. Lovecraft's At the Mountains of Madness.
One of the key elements of that story is that the civilization was effectively wiped out by their own creations, in this case the Shoggoths.
And, it's come up several other times since then, somewhat recently in regards to humans and their machines, a la The Terminator and The Matrix.
But what other times have we seen this idea? I assume it's something fairly contemporary, since humans have only recently (within the last century) developed the ability to create things that are capable of destroying us (at this point it's limited to things like disease, but you get the point), so it seems less likely that earlier authors would even have conceived of the idea.
I'm not sure what literary device this idea falls under, so it's difficult to just Google it, so I'm asking if anyone here has any other examples besides the ones I've noted of the "civilization wiped out by its own creation" stories. In particular, older ones such as Lovecraft or his contemporaries, or even earlier. Basically, I'm curious as to how old this idea is, and how often it's been used in fiction. This isn't for a paper or anything, just my own curiosity.