This doesn't seem hard to do. Messaging apps exist in app stores, transmit data through one of a few ISPs often past national boundaries to a couple of data centers. It's not hard for a national government to see the communication and stop it or punish those attempting it.
It could be done by technical means, putting pressure of the stores, or anywhere along the chain.
Countries block all social media by fiat. It seems easy enough.