Just about anything canned is dangnear eternal. I’ve been keeping things five years and longer and testing them. Only the tomato-based stuff (like my camping fave, Chef Boy-Ar-Dee Raviolis and S’getties) seem to deteriorate (NOT spoil!) over time.
I have been stocking up on items like you suggested. I check the expiration dates on everything I purchase now, and I try to ensure they have a shelf live of at least 2-3 years, longer if I can find them.