On that note, it is by the way theorized that the necessity to coordinate farming with the floods and other farmers is what kicked off civilisatory development.
And, as you note, an original challenge that predates human advance into the northern environments as glaciers retreated.
The great OG mathematical challenge for humans was the "fair" recurrent remarking of land plots following a flood - how to survey land area, and how to plan for and account for food surplus to last over food scarcity.
However this is as big as drought, if not larger. Not just insects, rodents, bird cyclictic overpopulation wiping out crops, but also fungus, bacteria, etc.
The world has starved more than once from such things, and the Egyptians had reverence for cats for a reason.
There's always some kind of scarcity everywhere, sure, but the key notion here is regular predictable extreme scarcity that can be planned for and hedged against with a considered amount of energy and advance preparation.