Yes. Older mumsnetters remember the Cold War and how close we came to nucleur armageddon. There were government adverts on tv about what to do in the event of a nucleur strike. Whitewash your windows and hide under the table, if I remember rightly! There were a number of occasions when we were literally minutes away from destruction.
People shouldn't underestimate the impact AIDS had on society and the potential it had to do even more damage. It was seen at first as the 'gay plague' and then straight people, who had been complacent when it wasn't them being affected, got worried.
What saved us from nucleur war was world leaders on all sides behaving sensibly to prevent mutual destruction. Also, that officer and other low ranking but pivotal members of the military making calm, rational decisions.
AIDS is still a problem in some parts of the world but what has prevented it from wiping out humankind is governments and organisations across the world working together to contain and treat it.
So, humanity is capable from pulling itself back from the brink. Just when people have lost all faith in those in power, they come good and find solutions. That is what I'm hoping will happen with AI.