Not a bad idea! The metal in a beer can is Aluminum & much thinner than the cab of our trucks which are steel. The comparison is apples & oranges in my opinion. But you are right, if the can is safe, the truck would be too!
About a dozen years ago in a Chevy work van, I used liberal amounts of spray foam to block leaks in the body from rust holes. Then coated some of it with rustcoating. After about 10 years the foam deteriates and needs some replacing.
What kind of sealant does the factory use? It appears our vehicles have some type of foam sealant from the factory?