You probably meant to say 6+ years instead of a “few years”. Apple is excellent compared to everyone else in this respect.
Apple's officially supported repair lifetime for hardware lasts for 5 years I believe. I managed to squeak in a few repairs right before some devices became "vintage" by Apple's reckoning, though I think they may still offer repairs for some older devices if parts are available.