The conventional "wisdom" to replace your helmet every five years is mainly marketing to goad people into buying more often. If there is a good reason to replace an older helmet, it might be to take advantage of MIPS technology.
https://asmedigitalcollection.asme.o...dFrom=fulltext
https://pubmed.ncbi.nlm.nih.gov/28462479/