... which is why historically Malthusians have been wrong.
A Malthusian bacterium writing at the time before photosynthesis would have concluded that life on Earth was doomed. Chemotrophic bacteria were gradually consuming all the left over high energy compounds from the Earth's formation and eventually this would run out, leading to a population crash and the end of organic life.
Their math would have been correct.
The thing they are leaving out of their models is adaptation and intelligence. Life isn't guaranteed to always find a way, which is why shorter term stagnations and die-offs do occasionally happen, but given time and resources it eventually will. Life will probably keep finding a way until the heat death of the universe.
The bumps in the road are part of the process. In evolution they provide the constraint that stimulates learning through natural selection. In post-evolutionary cognitive intelligence (humans and eventually AI) constraints give rise to signals such as price signals that tell the system that it needs to learn, change, and adapt.
This isn't a justification for total rose colored glasses woo-woo utopianism because as I said bumps in the road do occur. But it shows why simple Malthusian reasoning hasn't historically been accurate and probably will continue to be mostly inaccurate.
Malthusians are like perma-bears that are always calling for a recession in the market. Occasionally they're right, but there's a joke in finance that these are people who have "predicted 54 of the last 3 recessions."
A prediction method that's wrong that often isn't actually worth very much.