It is important to know that the client will mask from where you are connecting, but it will NOT mask who you are! This is due to the fact that your alias at the jabber server was probably created beforehand. And even if you create the alias with Tor Messenger, your connections to other users make it possible to identify you.
If you want to chat REALLY anonymously have a look at the excellent article at the intercept “Chatting in Secret While We’re All Being Watched”. It explains how to create an alias anonymously, make first contact, choose a jabber server, choose a username, use TOR, etc.
My point is:
It’s really difficult to stay anonymous. It’s easy to encrypt what you are saying to each other.
Just use OTR. OTR will encrypt your communication end-to-end. Not even the jabber server(s) in between can listen in on what you have to say.
In case you want to use TOR with your existing jabber client, like Pidgin, use your Tor-Browser. It will mask where you are accessing the internet.
Make sure Tor-Browser is running. It will open the local port 9150. Configure your account to use a SOCKS5 proxy. Server: localhost, Port: 9150. That’s it. Pidgin will connect this account through TOR.