Stocking some foodstuff that does not go bad quickly is a very sensible thing to do, but people should do that normally, without any crisis going on. At the very least, do what I did, and stockpile something weeks before the others do, so that you are not a part of the supply problem. If people did it a month earlier on average, buying stuff would spread out over several weeks, and the supply chain would have time to react through its normal feedback loops. Also being early, before the panic, allows you to make rational decisions (of not buying foodstuff that goes bad because you don't want to eat them).
I stocked some basic foods weeks before the large-scale public panic (which started here yesterday, and will get much worse because the authorities and the government have totally fucked up everything in the traditional, totally expected Finnish "the most important think is to fake keeping cool, and if there is even a small risk of looking stupid by overreacting, it's better to underreact, and nothing bad will ever happen in Finland" way. For example, people coming directly from northern Italy, with the symptoms on while already on the plane, were not only not quarantined, but also denied testing, despite numerous attempts to get treatment! But our public healthcare system which we once were proud of, has already nearly crashed even before the corona, so it's only to be expected. Oh, sorry for the sidetrack...)
Optimally, it's stuff that you like to eat in any case, and which won't expire in two years or so. If you have a stockpile for one month with stuff that expires in two years, it means you need to eat that stuff from the stockpile FIFO regularly at 4.2% duty cycle - 95.8% of the food you eat can be outside of your stock FIFO. You just need to come up with a way so that you remember to use the stockpile every now and then (and to restock it).
But being a responsible (for yourself, and your close ones) adult is, IMHO, understanding and managing things like this. It's not too hard. If you can design a frequency compensation network, you should be able to do it.