But what is the probabilistic timeline on a large asteroid hitting us vs. rendering the planet uninhabitable by our own devices? We aren't currently looking like a great bet to last thousands of years longer, forget the million-year intervals on which large asteroids are a serious threat.
The planet is not even close to uninhabitable. Humans are resilient, and can solve problems when they become real.
Take the global warming. We actually know how to solve it - we just don't, because it's not a real problem yet (not on a large scale at least), and it costs money to solve. We can put mirrors in space or on the surface of the planet to cool it. Yes, it's expensive, but it's doable.
Pretty much no scenario makes ALL of our planet uninhabitable to humans. Except a big f*ng asteroid.