Why 5 years? Why not 4 or 6? Actually, I think the warranty period should increase, always. For example by one month every year. So a product sold in 2017 has a warranty of 2 years (24 months). A product sold in 2018 would have a warranty of 25 months. A product sold in 2019 would have a warranty of 26 months. And so on... This would encourage (force!) companies R&D to always improve products, but at a sustainable speed.
Of course the figures given above should be tweaked better, maybe start at 3 or 4 years warranty very soon, increase by 1, 2 or 3 months per year, I don't know.