Of course you’ll need a way to cook the dry food. The most sustainable way I know of is a small portable solar system and an instant pot. The instant pot is very energy efficient so you don’t need a very big solar system depending on where you live. If you store flour, you can also get a bread maker, which is pretty efficient.
The reason I like this strategy is that it’s cheap, and you don’t have to think about it very often. You can just trash the food after some number of years. You also don’t have to eat food close to its expiration date normally.
The only hiccup is fat. Cooking oil goes rancid, so you probably want to replace that every year or so, but canola/soybean oil is very cheap.
Of course none of this is very healthy, so you’ll want to include some vitamins…