What sci-fi of the 1950s was showing world of environmental collapse - not nuclear war, not overpopulation.
Maybe not the 1950s, but in the 1960s it became a well established trope. J G Ballard and Frank Herbert in particular lean heavily on themes of environmental destruction
If we count the Golem stories then the idea of a human made artificial servant rebelling against us because of our hubris is hundreds of years old.
That's just not true. Nick Bostrom published "Superintelligence: Paths, Dangers, Strategies" 12 years ago. The book is clear evidence that people were very much seriously thinking about the potential dangers of AI.
You’re telling me nobody coughed like mad drone inhaling the exhaust fumes (or died) early in car development?
Nobody dumped their used engine oil on the ground to kill plants and bugs on purpose?
Of course they knew.
The really sad and shocking thing about AI's threat to humanity, is it feels like the obvious warning in the movie(s) was ignored, while certain people are using the movie plot as a guideline for how to carry out human extinction.
Metropolis (1927) had robots that infiltrated a revolution to sabotage it for their masters.
Frankenstein (1818)?
...