I don't know if they are legal or not. But assuming you don't want to leave a company, there is minimal tact of what to say when.
You have a choice not to use said tact, but this entire "employee goes on moral crusade, gets fired, goes on moral crusade about firing", is a feature of a kind of employee that is even for other employees not amazing to be around
There’s enough of a difference, IMO, between campaigning against your organization’s plans and venting to your coworkers about the way in which the CEO delivered said plans.