This is already fully implemented with Discourse Encrypt (for Personal Messages)
Works awesome.
I can confirm the encrypt plugin makes private messages between users impossible to read without decryption keys. No admin snooping is possible.
Matrix, Signal, Rocket.chat, Wire offer e2e and are open source. Then there is Whatsapp and Telegram. Just to be clear for anyone else reading this.
Be sure to try out Discourse Encrypt. Works great! Full encryption you add to your session in order to access your encrypted messages between you and x other people. No dependence on categories or other functionality, which is how the chat works. Zero complaints!!!