This might be useful when your machine shuts down unexpectadly under heavy loads: https://github.com/FlyGoat/RyzenAdj
For me it only happens in Windows when the batery is charging too. I think charging thresholds are a must. In linux we have tlp: https://linrunner.de/tlp/ and https://wiki.archlinux.org/index.php/TLP and https://github.com/linrunner/TLP :-D