Nice topic OP. As a caveat, I have never owned an XBox console so I am limited to Nintendo and Sony opinions.
That said, my evaluation of the quality of engineering of a console starts and ends with longevity. If I purchased a car I'd want to get one that will require minimal maintenance and not break down or require major repairs for as long as possible. I view consoles the same way.
Given that, I would almost always select a Nintendo-built console over the competition, with some minor exceptions.
I owned the NES, SNES, and N64, and all of them kept working with basically zero issues until I sold them. In the case of the N64 I still have my original console and two original controllers from 1996. Everything continues to work to this day. I never owned a Genesis (rented it only) so I can't really say how long-lived it is.
My GameCube worked flawlessly until I sold it around 2015. I still have 4 working GC controllers that have no issues.
The only console that has straight-up failed on me is the PS3. I had 2 PS3s since launch date (both OG fat models) and I loved them to death. However, about 2 years ago my first PS3 finally died with the YLOD. Being as how I had never had a console fail I was not prepared for this occurrence. Unfortunately I had discontinued PS+ by that point and so permanently lost a bunch of save data (including my Rock Band expert drum career, which was a real bummer). From an engineering standpoint if you don't design a console that is immune to failure you better have a way to backup essential information. I was once again dismayed to learn I could not use my save data backup from my PS3 as it is locked to the hardware. So, while I love love love the PS3 (still use one as my primary Blu-ray player) I cannot say it is well-engineered.
As a comparison my two Wiis from 2006 and Wii U from 2012 are both still going strong.
To be fair, the Switch does not reach the normal Nintendo-level of engineering due to the controller issues. However, I will take replaceable controller issues any day over a permanently bricked console that wipes out untold volumes of data. And no, cloud save doesn't save Nintendo here as that's behind a paywall. Still, the quality of console they packed into a handheld is pretty amazing. I have also never had screen scratching issues despite docking and undocking hundreds of times.
In summary between handheld and console I have never had a Nintendo device fail (handheld: GBA, DS, 3DS, 3DS XL ... and my GBA is still perfectly functional). From an engineering standpoint that speaks volumes, to me. Here's hoping Sony and Microsoft take a page from Nintendo when it comes to designing with longevity in mind.