"As late as possibe" might be something like year 2200-2300, after global temperatures have already risen 5-10 degrees.
> crops fail due to the climate becoming unpredictable and wars over clean water become ubiquitous
Currently, we're facing what can become the worst famine in decades because of a single war that was NOT caused by global warming or access to water. Just simple nationalism.
The food supply 50-300 years from now is really hard to predict. If the birth rate stays at current levels, and also reach such levels in the few countries where the birth rate is still high today (mostly Africa), there will be a lot fewer mouths to feed in 2100 than today.
And if the birth rate goes back up, and exponential population growth resumes, no amount of food production will ensure that we never run out.
Right now (or rather, before 2022), the amount of food produced per capita globally, is probably higher than at any time before since the dawn of time.
Thanks in very large parts to fossil fuels used for farm machinery and in fertilizers.