We are lucky to have ample storage space, so we can avail ourselves of the use of mylar bags in the Costco 45 liter plastic tubs for rodent protection, and then, as you say, limit acid foods in cans.
We too have pastas stored in various ways, from full vacuum to oxygen absorbers. Both ways mitigate the problem of insect pests in purchased goods.
One thing I rarely see mentioned but is critical is salt.
It’s critical for survival and not a lot of places are near a good supply of it.
I wash out my glass spaghetti sauce jars and use those to store it so it doesn’t cake up. Since the lids have that built in gasket, it’s hermetically sealed and keeps the moisture out.
And they seem pretty corrosion resistant.
I would also to a decent supply of high quality vitamins, to avoid vitamin deficiencies.