I’ve been using Macs since 1996 and have not experienced regular kernel panics on any of them since the early 2000s when I started using Mac OS X Public Beta. Your experience is frustrating but it’s the exception, not the norm. The fact that you can find other people, on forums like HN, who have also experienced problems is indicative of the selection bias of the Internet, nothing more.
Run the built-in hardware test, extended version. If it finds any fault, take it straight in for service. https://support.apple.com/en-us/HT201257
If AHT shows no errors, clean install macOS. As in, wipe it totally, and reinstall. This is tedious but I expect Apple support will recommend it anyway. And if you've already done it, it might save time.
What kind of shock? It's not like they have spinning disks anymore.
Oh, and one of the times it crashed I distinctly recall setting it on the table too roughly and hearing a ping sound emanate from the closed laptop. When I opened the lid I saw the kernel panic screen. I'm chalking that one up to shock. It's been completely fine since though.