"Are we doomed because of human stupidity?"
No. We're doomed because we are building a civilization that is too complicated for us to understand. Homo Sapiens evolved to optimize for a hunter-gatherer lifestyle in Eastern Africa. We do that very well. By a series of fortunate accidents, we have culturally advanced far beyond that, and are now attempting to handle a civilization too advanced for our cognitive capacity.
Your estimate that we have but ten years left is too pessimistic. We'll patch together a collection of partial solutions to our current problems and muddle through. I give civilization to the end of this century. The end will come when we nuke ourselves, because we're so mad at each other that we can't think straight.