I originally had a 2019 16" MacBook Pro, running Big Sur, and with a cheap power pasthrough dock. I would get kernel panics about 70% of the time on Shutdown, and the MacBook would restart. If I immediately then did a second shutdown, it would behave. My panics were most often "panic(cpu 0 caller 0xffffff80066c0213): "PowerOff timed out in phase 'Notifying power plane drivers'. Total 30000 ms:", less often the phase was 'Notifying priority clients'. Once it was 'Halt/Restart Timed Out'. It almost looks like the shutdown period is limited to 30 seconds, and something is slowing down the process. The only thing that seemed to solve the problem was if I unplugged the dock and powered off my external monitor before invoking the shutdown.
Next I changed to a 2021 16" MacBook Pro M1Max and upgraded to a CalDigit TS3 Plus, and MacOS Monterey. Everything different except the monitor, and I have exactly the same problem with exactly the same solution!
I moved across using the Migration Assistant, and I've had nothing but trouble. Time Machine won't backup my external drive, although it does use it to calculate the size of the backup (this might have been caused by TimeMachineEditor, although uninstalling it hasn't helped); moving a 300KB file from the internal drive to an external drive invokes a progress bar!; "recent" files displays in apps actually take time to load; it doesn't seem to have indexed the external drives, as I often have to wait while a "Loading" timer pops up... the thing is slower than my old MacBook! I'm now going to have to clean off everything, install a fresh OS and then get the thing checked to make sure it's not a lemon, before arduously reloading all my 3rd-party apps.
At least I now know I'm not the only one with this kernel panic problem...