It's a familiar chestnut: "the dinosaurs would be around today if they only had a space program." Of course there's truth in this. If the lubberly lizards that once stomped the planet had rocket technology, they might have deflected the 5-mile diameter asteroid that speedily incinerated them and subsequently starved most of what remained.
Of course, a space program--while necessary--wouldn't have been sufficient to forestall the dino's incandescent demise. A good defense would have required an active astronomy effort to detect the incoming rock. Physics was essential as well, for otherwise how could they calculate the asteroid's orbit?
This is an all-too-elaborate digression on a wry joke, but there's little doubt that our brains, schooled in science, can insure us against the sort of cosmic catastrophes that might afflict us in the next few tens of billions of years.
For example, imagine the sorts of things we might do when faced with an impending ice age. Such an event can begin rather quickly (in decades), and would be disastrous for Canada and Europe. But fending off the Big Chill might not be impossible. One approach would be to decrease Earth's albedo--which is not its lust for other planets, but the fraction of incoming sunlight that it reflects back into space. In other words, we could arrange for our planet to be less bright. A way of doing this would be to use a fleet of aircraft to layer the ice fields of the arctic with coal dust, so they became warmer in the sun.
As an alternative to this gritty approach, we might, by the end of this century, be capable of building very large, orbiting solar reflectors, aimed earthward to bring a little more light into our lives. If we increased the amount of sunlight hitting our planet by 10% or so, we'd no doubt reverse any cooling trend.
Another straightforward possibility would be to bring back Freon, the coolant that once circulated in our refrigerators and air conditioners. It's a great greenhouse gas (which, of course, is why it was phased out), so smashing up old fridges, and thereby boosting the greenhouse effect, could keep the world from growing cold. You could also buy an extra SUV, which would do much the same. Let's face it: ice ages have been scraping up the landscape for millions of years. But with a bit of informed technology, we can insure that the last ice age will be, well, the last ice age.
Consider another imminent threat: a reversal of Earth's magnetic field. This would eventually require a re-labeling of your Boy Scout compass of course, but the real problem is what happens during the interval, halfway through the reversal, when our planet has essentially no field. High-energy particles that zip through space would no longer be either repelled or guided to the poles (where they now produce nice auroras for the entertainment of Eskimos and elk). Instead, they would rain down everywhere, inflicting cancers on us, and wreaking similarly distasteful damage on other life forms.
But - and this is true for many of the cosmic disasters that offer to ruin your whole millennium - this reversal would not happen overnight. There would be years to prepare. By staying indoors, and perhaps adding more insulation to the attic, we could avoid DNA doom for Homo sapiens. A harder task would be protecting necessary wildlife, but keep in mind that there have been many magnetic reversals in the past, showing that nature, even without our help, can take care of its own - or at least, evolve survivors.
Many of the dangers that will confront your extremely great grandchildren involve changes in the Sun. The gradual brightening of Sol's ignescent face will begin to interfere with plant life in 100 million years or so, but this problem, too, could be engineered away. By that distant date, it should be a fairly simple matter to erect orbiting barriers to reduce the solar flux, or possibly re-formulate our atmosphere to act as a natural screen.
In a few billion years, the Sun will begin to die, swelling up like a puffer fish. An obvious counter-move by our descendants would be to simply decamp to a cooler neighborhood, either farther out in the solar system (think: engineered habitats), or to another star system altogether. Either would be a grandiose engineering project, but this event is in a future so remote that it would be silly to assume that neither could be done. And in any case, migration would probably be simpler than trying to "rejuvenate" the Sun by changing the conditions in its dying core (a fix occasionally suggested by those who consider the possibility that someday we will not only go to the stars, but interfere with their personal lives).
There's no doubt that the universe will present us with difficult, and occasionally lethal, events. That's guaranteed to happen. The dinos, despite their impressive bulk and Naugahyde skin, ran head-first into a cosmic catastrophe. Their bones are now stacked up, labeled, and on display. They were incapable of averting disaster. The same could be true of any society that doesn't school its populace in science. Therein lies a lesson.