I mean, every Apple device I’ve ever had still works - my PowerBook G3 from 2001 still runs just fine and does all things it did back then. I have a 2012 Mac mini that still runs 24/7 doing house server duties. iPods from 2001-2009 that see very regular use. An iPhone from 2018 that saw SO MUCH abuse from me but keeps chugging along despite missing several components.
Software wise sure things get outdated but Apple hardware is overall pretty resilient. I’ve had Dell laptops that started eating their own storage, the PC I built in 2017 ended up having its motherboard go bad for no apparent reason.
Tech is basically a thing that will last as long as it’s maintained properly. Capacitors and fans, and spinning hard drives are about the only things that go bad on these things so any brand should in theory last forever as long as it was designed well. A lot of Windows devices have a knack for overheating themselves and have poor thermals, which leads to an earlier death - but that can often be fixed if a user is willing to tinker.
Just my own experiences though - obviously only anecdotal.