I was wondering about this after I realised that Dr. Isaacs in Resident Evil wants to wipe out humanity again and then restart it with a chosen few so life stands a better chance.
Dr. Isaacs: I propose that we end the world... But on our terms. An orchestrated apocalypse. One that would cleanse the world of its' population but leave its infrastracture and resources intact. It's been done once before. With great success. The chosen few will ride out the storm, not in an ark as in the book of Genesis, but in safety. Underground. And when it's over, We will emerge onto a cleansed Earth. One we can then reboot. In our image.
Resident Evil: The Final Chapter
And that Thanos from Marvel has a similar idea but on a universal scale. I know that his motivations aren't the same in the original The Infinity Gauntlet comics but in the MCU and specifically Avengers: Infinity War he wants to do it so life can succeed.
Thanos: Little one, it's a simple calculus. This universe is finite, its resources finite. If life is left unchecked, life will cease to exist. It needs correction.
Avengers: Infinity War
But, what was the first work which brought about the idea of deliberately wiping out half of humanity, a species, life, a planet, a universe in order for it to survive?