I love my 2012 MBP, but ultimately it's been so unreliable (and I can't stand the new butterfly keyboards) that it pushed me into buying a Windows laptop. I still use the MBP quite regularly when it's working though.
For now I'm getting a Mac Mini instead. Seems like the option with the least amount of risk attached... It has a fast desktop i7, that should last 5+ years, and its not that pricey either.
"Your computer restarted because of a problem", and subsequently having 20 apps open up on login is the bane of my existence on MacOS. Same issue with my work touchbar MBP.
Apple has had quality issues for much longer than most people realize. It keeps getting worse.
The mid 2012 laptop I bought new went through two separate optical drives before I stopped using the drive altogether and put in another hard drive. The laptop also had two bad logicboards from NVidias recall iirc. One board died a month after getting it new, and the other died almost 3 years later.
To this day it is still going strong. I am starting to run into some video ram type issues (I think). I get random lines on any screen (external / internal) and a full reboot "fixes" it. I don't want to replace it, but after all the Apple changes (iOS devices vs "Pro" devices mainly), I just don't think any of their laptops fit my needs for a device anymore.
Like you said though, Apple has always had some hardware type issues like this. I remember HP, Dell and Lenovo all having big issues like that too when I was on the bench.
What I'm doing right now is just using my MacBook pro in lid-closed mode with an external monitor and the Apple wireless keyboard/trackpad, so I can avoid those keyboard issues entirely. It's very stupid I need to even do this, but here we are :)