I think that's a symptom of the provider you chose, not the XMPP sphere itself. I've used Jabber/XMPP for just over 15 years and while I've seen plenty of bullshit going on in various highly popular MUCs (join-floods, phishing attempts and such) I've never personally been subjected to spam directed at me.
replyI have joined XMPP rooms via Matrix and have already gotten spam from XMPP this way
reply