You make those networks illegal to use. Just using them would be illegal, regardless of the contents of your communications.
It's mind-bending levels of absurdity. Surely nobody intends to (be able to) truly outlaw computers? That cat is out of the bag and people will build them or get their hands on them if they wish
The only possible outcome is that only honest citizens have their chats scanned and devices locked down. The latter has as side effect that Google, Apple, and Microsoft can do whatever the heck they want because open OSes are illegal now
Good luck with that
Communications that look encrypted can also be straightforwardly flagged and logged for a closer look, perhaps keeping a closer watch on any cleartext messages, metadata that invariably leaks, etc