In fact, at least once, homo sapiens almost did die out. It was a very, very close thing. Sometime, about 70-75,000 years ago, there was a nearly world-wide catastrophy. Right now, the best evidence points to a major volcanic eruption, most likely Mount Toba, in Indonesia. It was one of the largest eruptions in history and led to a 1000 years of Ice Age and worse conditions. During that time, things changed so quickly that almost all mankind died out.
The genetic evidence is quite strong that humans were not reduced to a very small population any time within the last few hundred thousand years. Tight bottlenecks in population size leave clear signatures in genetic variation, and those signatures are missing for humans as a whole. (They are present, to a modest degree, in non-African populations, which is usually taken as a sign that there were population bottlenecks in the Out of Africa migration.)