Humans actively monitor and defend against each threat. In the U.S., NASA is committed to detecting asteroids, and recently successfully altered the course of one [2].
I believe we are most powerful to overcome extinction events as a united species on the planet we’ve evolved to live on over billions of years.
[1] https://en.m.wikipedia.org/wiki/Human_extinction
[2] https://www.jpl.nasa.gov/edu/news/2022/9/22/the-science-behi...
So, having humans on Earth + Mars at best only marginally improved the chances of humanity surviving long term than only having humans on Earth, by a tiny amount.
It's a very exciting, multi-generational project to think about. Though frankly I think we're going to get AGI + brain/computer interfaces + cloud mind uploads before we get martian terraforming; and dropping the bag-of-meat related requirements would make extraterrestrial colonization much easier.
That's also the best option, not betting on a single idea or technology.
That is, they can bring a lot of fancy stuff with them, but to be self-sufficient they'd have to be able to maintain, repair and ideally rebuild what they need indefinitely without resupplies from Earth.
I think that it could be possible for them to focus on few important/key paths, in theory. But, unless they research and prepare for exactly that scenario and chances that it works would be strictly in their favor and they all would work hard, learn hard and motivate themselves through their entire life, I don’t see how it could work. Not to mention political, social, religious risks with the next generation.
I’m not 100% sure ofc, that would be no doubt an interesting “experiment”.
All the space infra could also possibly help detecting and averting space born threats, such as asteroids on a collision course.