Just a (probably obvious) reminder - but a lot of people start worrying about how much and what type of food and neglect to store sufficient water. If you’re in a wet area or have local wells, fine, but water is likely to fail soonish, even if you’re gravity fed, and is a more immediate need, especially, if like many Americans, you’re already carrying round a emergency external fuel tank around your waist like myself.
And water takes a lot of space to store. I also mention this because a ton of canned foods (not all of course) have a metric ton of sodium. Sure, worrying about your sodium to water balance is probably a longer term worry than a SHTF scenario, but…
A second question for @StarvingButStrong - you’re seeming to outline a plan for a shelter-in-place sort of thing, where bulk and weight are secondary issues, but having some of your shelf-stable foods prepared in a lighter weight format is a good idea in preparing an emergency evacuation bag. One of the things inherent in a lot of this sort of discussion is heating your emergency food, as seen here.
That means a LOT of semi- or unprepared people starting fires, which they may not have prepared for. And if there’s an interruption in power, fuel, and water, and a lot of fires, well, that’s a really bad situation for runaway fires.
Otherwise, stock foods that are high in non-sugar energy-to-weight. Soups, or anything watery aren’t going to give you much energy for the weight (though are a secondary source of water), and many canned fruits are the same. I’d go with lower sodium options like canned sardines (though pricey) or tuna (ideally with little to no salt) ideally in oil for more energy density (rather than water), lower-sodium/sugar canned bean options (baked bean options are often the worst), and other higher fat/protein options.
@MacDoc’s suggestion is also fine, especially for a bug-out/evac bag, but you’re generally paying higher costs, getting slightly reduced durability, and marginally lower shelf life than quality canned goods. And of course, if shit gets really screwed up and you loose or break your can-opener, well, those cans aren’t going to be fun at all!
Otherwise, and back to the explicit ask of the OP, unsafe canned goods are going to be the rare exception not the norm in terms of cooking. But as always plan for careful storage of the cans, and do periodic inspections to check for degradation, swelling, dents or other damage.