So when the inevitable happens and they make encrypted messaging apps illegal, this is what someone should do:
Write a simple unencrypted messaging app. Something like IRC, but with much better support for phones and other modern devices than IRC clients typically have. Such a thing is clearly legal.
Sit back and wait. Oh, look, someone has written a plugin which supports end-to-end encryption over the app's connections, how odd, no-one could have predicted such a thing, right?