If a person commits a crime, then let courts decide, otherwise it's just mob rule and vigilante "justice".
That said, I think it's going to take at least a few more decades before such a ruling is made. I suspect it will come along the lines that internet history is protected speech, and so it's a protected work category and is illegal to fire a person over. Once companies can just point to the law and shrug, then they can ignore the online mob.
Additionally, one would think cancelling should fall under libel and slander laws, and the accused would be able to go after the instigators.
It's uncomfortable when it's "your side" that finds it's goals at odds with human rights, but in the end we're all better off with defending basic human rights. Policing morality is infinitely more difficult and oppressive, no matter how much it really feels good at the moment.