That sounds like something the free market can solve. If people want bottles that last 5 years, then some company can offer a 5 year guarantee, or there could be independent testing laboratories that verify these claims.
> some have unique caps that if you lose or break, you can never buy a replacement.
I think you're more likely to lose or break the whole bottle than just the cap, but in any case, I don't think the government needs to ban all innovation in bottle caps just to solve the non-existent problem of people losing those caps.
You're right, though, that if refilling machines needed bottles to have a specific opening type in order to connect to the machine securely, then the industry would need to settle on a common design. Fortunately there is already a manufacturers association which would make that possible:
https://en.wikipedia.org/wiki/Closure_%26_Container_Manufact...