XMPP was supposed to be this. There was a boom in the early to mid-2010s (I worked at HipChat back then, and it was built on top of XMPP). IMO, it works well; it scales, but none of the commercial solutions picked up for whatever reason. In the end, as you say, proprietary protocols like WhatsApp or Slack won the market.
I've heard great things about Matrix. Peeble's founder, Eric, was building Beeper, a chat app with a similar purpose to what you describe (it recently got acquired by Wordpress). I believe that the core was built on top of Matrix, so you might be up to something there.
I've heard great things about Matrix. Peeble's founder, Eric, was building Beeper, a chat app with a similar purpose to what you describe (it recently got acquired by Wordpress). I believe that the core was built on top of Matrix, so you might be up to something there.