If you did finally create a computer as capable as the human brain with the software to actually think like a human, you would still have less than 1/7,000,000,000 the amount of computing power you need. To create such a simulation, we don't need just one simulated brain, we need 7 billion of them to recreate the number of brains on our planet (plus we need extra computing power to model all of the animal brains, physics, geology, etc.)
This is the biggest weakness of this idea. It is highly unlikely that computing power truly has no ceiling, to begin with, so if we manage to continue existing indefinitely, we would likely still run into this limit. Even if there were no such limit, can we get there before extinction?