My anecdotal evidence: I have bought 6 desktop and 5 laptop Macs over the years for myself and children. One laptop gave up the ghost and wouldn't boot after 12 years. None of the other Macs stopped working. I had to discard some which just got left behind by the technology, like my MacPlus and the LC and the G3.
The first one I ever bought was the LC. I picked up the MacPlus at a secondhand store for $5, and it worked for several years before I had to let it go.
I have taken desktops and laptops in for repairs, but these things just won't die.