Your system has both thermal and voltage sensors and both can cause your system to go into CPU Safe Mode. This is where your CPU's clock is lowered to keep the system from overheating. This is when the Kernel process is consuming a lot of threads.
Most of the time we see thermal issues or a bad/disconnected thermal sensor. I would install a good thermal monitoring app to make sure that's not the issue like TG Pro using the free version will allow you to see the thermal sensors and fan.
A common cause is liquid damage into the keyboard or trackpad or on your logic board’s voltage sensor has failed or the voltage divider logic is bad.