Is it better to use this with a own selfhosted server then Matrix and Xmpp?

You can use your own self-hosted servers with this too.

If you want.

Self-hosting can create its own additional privacy and security issues… unless you totally trust not only the place where you put the server, but also yourself to be a security expert