Why are "spindump" and "sandboxd" eating up all my CPU?

I would say these are expected processes and they are designed to capture logs for analysis in the case of spin dump. I would focus on what apps are non-responsive and open a support case with each app owner.

The sandbox is odd, so unless MATLAB has configuration to minimize that, I would start with Apple support to see about what is driving that CPU usage. Both of those processes are needed and just like kernel_task, they respond to what is happening on the computer so you don’t “fix” them as much as understand why your workload is causing them to consume resources. Once you nail that, you can have your battery life, heat generation and performance back. They are valuable clues as to what is happening on the system.