A Matrix server is a good solution. You can disable federation if you would rather not talk to other instances and have a similar experience to Mattermost, Slack, etc.
If you dislike the Matrix protocol, an XMPP server would work exactly the same way.
NextCloud Chat could also be a viable solution for internal chat.


Tailscale or Netbird, any of them is better than setting up DDNS and securing the network access yourself.