I had the same problem, though not to the point of safety shutdown.
Fiddling with vgaswitcheroo and acpi settings mitigated the problem. My laptop is much cooler and silent now.
This has been the biggest pain point in Linux for me so far. I am wondering why these problems persists. They have a huge impact on the (non-)adoption of Linux/Ubuntu.
I'm considering making a donation to ubuntu to improve this situation. What do you think?