Brendan Eich wasn't purged for anything he put out on social media, it was for a past political donation. But you are correct that minimizing social media use, or at least viewing what you publish with a PR perspective, will minimize risk of becoming the prey of ideological mobs.