A standard XMPP server could be an alternative. Apparently WhatsApp (~2 billion users) use a fork of ejabberd as their backend.
ejabberd is a good place to start an xmpp chat service. Facebook messenger was built on it, WhatsApp was built on it, Riot Games chat was built on it. I'm sure there's others.
If you attract enough users, you might end up needing to modify it for your needs, but that's a nice problem to have. There's a fair amount of presentations at tech events with bits and pieces of infra knowledge from FB, WA, and I think Riot Games. Although some of that is fairly obsolete... You don't need to work as hard to scale Erlang today, the BEAM is a lot more scalable out of the box in 2025 than it was in 2011, and you can also have a single host with a lot more ram and compute today too.