Slack is $45/user/month
Soon you'll be able to write, host, and maintain a fully customizable version for probably 20k/month
If you have a lot of employees this makes sense
We've had xmpp for decades; the issue is that companies don't want to be responsible for it not that they can't do it
What features are you using that the $18/user/month plan doesn't cover?
If people wanted to do this theyd be self hosting xmpp servers already. No one wants to write and maintain the code and infra for things like this, you are grossly underestimating the effort involved here.