There's nothing with modern complexities that is going to last that long. Think of the complexities of today's system. I mean I've got my original PlayStation, it's 25 or 26 years old now, and it mostly functions to your point, but it also hasn't been heavily played (or really played at all) for about 20 years. But my PS2, I went through three of them in 6 years. My Xbox is almost 20 years old, it's my second (and is making weird noises). And so on. My PS4 at 10 years old runs, but makes a ton of noise and is definitely slower than it used to be. It ain't making it to 20, that's for sure, I mean maybe now that it gets zero use it might.
My point is, the more intense they got, the more problems I started to have. As the boomers like saying too, shit ain't built like it used to be.
Yeah it's a bit of a pipe dream, but my point was that if they reduced the complexity, increased the build quality, and made it repairable, then I would be so happy.
Nintendo are just the bunch of madlads to pull it off too. It's not like need to worry about being profitable.
E: my mistake, forgot I was in the gearhead community :p
Another thing is that the power profile of consoles (and computers in general) has gone up a lot since the earlier consoles. Even if it was well-designed, the thermal paste in all of the coolers would still get hard over time and need to be replaced. That wasn't as much of an issue with consoles like the Nintendo 64 that used a 20-watt wall adapter as opposed to the max of 200 watts* a PS5 can draw under load. (I don't have a PS5 so I don't actually know if this is accurate but it's what Google said)
The switch doesn't use much power either but having a battery and the thin profile makes that type of longevity a lot harder. (Granted, longevity is hard for anything with a lithium battery)