It works both ways. A law can be almost nothing without technical means to enforce it efficiently. There can be cases that make a law [almost] futile so the governments give it up. E.g. many governments tried to ban alcohol but it's so easy (yet dangerous as it can blow up and set the house on fire, especially if the cook is drunk and/or the hardware is amateur) to produce at home that fighting it seriously just doesn't seem to make any sense. Some governments have tried to ban the phalaris grass as it may contain tiny amounts of dimethyltryptamines but it just grows all over everywhere so they have given up the ban as it was almost as ridiculous as it would be to ban sand, flies or whatever this common. The problem is to invent a medium for exchanging messages that is easy to establish independently (no need for uncommon devices, no special requirements to the underlying ISP) yet very hard to detect, compromise or disrupt. This sounds like a serious challenge yet not like an entirely impossible thing provided breakthroughs in mathematics/cryptography, physics and the telecom tech still happen from time to time. Some political/economical factors may also play on our side occasionally. My hope is for the whole Internet to morph into a fully-decentralized distributed network employing DIY P2P links as its organic and vital part. Perhaps this may happen once if something is going to make classic ISPs unprofitable and stimulate growth of MESH networks with something like i2P serving as a layer connecting them in one secure and reliable global network.
So the dry laws in the US and in other western (primarily Nordic) countries isn't that great of an example as these were still mainly liberal democracies despite the restrictions.
The similar laws in more authoritarian regimes would work quite differently.
And unfortunately we have too many modern examples of how effective governments can be at suppressing various behaviors and or ideas.
If the gov. just murders you and gets to your stuff, they can't analyze it to get at more people in your circle.
It just doesn't solve the problem of violent government. But there are still benefits.
China's an interesting case, as Xi Jinping is indeed turning the screws tighter as well, so far seemingly without any sort of harm. The historical record on this however suggests this is unwise. Time will tell, I guess. As I see it, at some point, censorship will end up conflicting with the type of knowledge / information needed to allow an economy to prosper.
On encryption, what "law and order" people need to recognize is that any crude tool "designed for law enforcement" will eventually be misused by criminals. Think if there was an enforced national house lock standard that includes a "police master key" that the police could use to open doors. I think most people would instinctively recognize the flaw, that in no short order a "police master key" would easily appear on the black market, making breaking-and-entering very easy (and consequently quite attractive to execute). Not sure why there are blinders on encryption, frankly the Internet needs way more security, not less.