I did this with chatmail.at and delta.chat it’s SOOO much simpler to host than matrix and federation is also transparent.
Not to mention that you can host chatmail on a potato