Honestly, the problem is not that there are layoffs, the problem is that the process sucks.

you don't need to fire this person immediately - you can talk to him, wind his operations down and then let him go. I.e. in Germany it's often half a year between announcing a layoff and anything happening (besides other stuff like making sure the layoff applies to the newest people first). Even if you don't want such a long period - talking to him and giving him a few weeks to wind down at your firm and starting to search for a new job seems perfectly reasonable. What happens if he wreaks havoc on your firm out of revenge? Really? Happens practically never. If it happens, sue him.

ofc this process applies to reasonable layoff - if it's for something egregious (breaking the law) you can and should fire him immediately.