Whats even better than planning for costly buffers that are unused most of the time is having a system that can adapt to unplanned changes in circumstances. So far I don't see that this isn't the case, but time will tell.
I have the impression that the highest profit margins typically fall on non essentials
Wheat costs about $200/ton and peaked around $450/ton during the arab spring period. A ton of wheat (with a few supplements) is enough to for 500g/day for 5 people for a year if half your calories come from wheat. Even at $500/ton, that's about $100/yr/person for the wheat itself. Wholesale raw foods are quite cheap from the perspective of someone in a rich nation. Can be quite expensive for the very poor. The solution is to help people in poor nations industrialize so that they are less poor.
Given the challenge of finding an optimum it seems like the world hasn’t done too badly.