It will be difficult enough to avoid disaster on planet Earth in the next hundred years, let alone the next thousand, or million. The human race shouldn't have all its eggs in one basket, or on one planet.
I see great dangers for the human race. There have been a number of times in the past when its survival has been a question of touch and go. The Cuban missile crisis in 1963 was one of these. The frequency of such occasions is likely to increase in the future.
But I'm an optimist. If we can avoid disaster for the next two centuries, our species should be safe, as we spread into space.
It will be difficult enough to avoid disaster in the next hundred years, let alone the next thousand or million. Our only chance of long-term survival is not to remain inward looking on planet Earth but to spread out into space. We have made remarkable progress in the last hundred years. But if we want to continue beyond the next hundred years, our future is in space.