Interesting question,
The longest I've ever had anything run electronics wise is a Pioneer 45 WPC receiver, it had issues after 33 years of use (I was the second owner) My Carver M1.5t amplifier blew the Triac at 24 years while my Onkyo AVR made it 17 years. Presently, have an old Kenwood CD player that is 24 years old and still kicking.
A buddy of mine has a Crown D150 and I replaced a power supply fuse and power indicator light bulb for him--the 1976 vintage beast still pumps out signal after 41 years. The large Sprague caps still look new with no swelling, leaks or bulging spots so back into service it goes. A neighbor of mine is a drummer and uses a 1983 Peavey CS800 PA amp with scratchy gain pots but no complaints after hard PA use for 30 years on the road.
As far as speakers go, avoid any of them with foam surrounds. The accordion type surround drivers will last at least 30 years with the longest one I've seen still kicking butt after 50 years. The golden oldie was in a pair of PA fully horn loaded speakers from the 1960's so the drivers "never saw the sun". The crossovers were shot so I measured, built a new XO with steeper filters, replaced all the wiring etc. and now they are used daily in a multi-channel system. The 1978 Peavey dual 15" bass bin still punches out the sound and is about to hit 40 years old.
Have a pair of 1999 Infinity Overture speakers with the rubber surrounds and they are still working. I'll have them replaced by next year because they will need the crossover filters redone, the ferrofluid in the tweeters will need to be replaced and the built-in bass amps are getting long in tooth. No point in refurbing a speaker with an amp built-in that there are no parts available for...the downside of that design.
As far as durability/longevity of speakers, I find that PA type drivers last decades without issue. The cloth on the accordion folds last at least 30 to 40 years as long as they are not sitting in the sun or mounted outside on the shores of the ocean. The main problem with them would be the electrolytic capacitors in the crossovers--replace them every 15 to 20 years and press on. I use metalized polypropylene caps as they should go at least 25 years without sliding out of tolerance.
You can replace ferrofluid in dome tweeters as long as the tweeters can be taken apart. The speakers with rubber surrounds on the woofers/subwoofers seem to be doing quite well after 25+ years. Maybe find a Polk Audio forum and sniff around to see how their old Monitor series from the 1980's are holding up.
In summation, if you want speakers to last a looooong time, use accordion type surrounds, keep them out of the sun (grills!) change the caps after 20 years, don't use ferrofluid in the drivers so it won't dry out, keep them away from salt air and if you are paranoid--rotate the drivers every 5 years to prevent sag. Take the things apart after 20 years, replace the gaskets, check the cabinet for leaks, replace the grill cloth, rotate the drivers and replace the caps in the crossover. Don't use speakers with built-in amplifiers, keep teenagers away from them and if your almplifiers have limiters--use them!
To keep the electronics lasting longer, don't overstress them, don't overheat them, keep them cool with plenty of airflow and salt air is the enemy. Pull the covers every couple of years to get the dust out, use a decent surge supressor and look at the caps to see if they are swelling.
You don't have to spend a fortune to get decades of enjoyment, how many ancient boom boxes with coat hanger antennae, broken cassette draws have you seen? 25 years later they keep playing tunes in businesses and garages the world over. Most electronics will last for many, many years if you take care of them...my clock radio is over 20 years old and was not made by audiophile elves with unicorn dust or mil-spec/medical grade components.
Or you can think about it this way, the worse case life for electronics is a car radio...massive heat/humidity, fridgid cold, punishing vibration and variable power supply. A stereo component living in a temperture, humidity and no vibration environment is nothing compared to car electronics so relax, most things will last many years/decades if you keep them clean, don't beat the snot out of them and keep them cool and dry.