The course of civilization is a race between catastrophe and education what is the exactly meaning by this sentence?

This was attributed to John F. Kennedy in the movie "Adam." I've not been able to find the quote anywhere. I believe it means that without education, rational and skeptical thinking will be replaced with dogma and sel-serving truths (we have a lot of that now), and our civilization could ultimately be in big trouble.

Actually, this sentence comes from The Outline of History by H.G. Wells :)