With the help of the Prosody channel (specifically MattJ), I finally fixed sending XMPP messages from Home Assistant.
The trick was adding and configuring https://modules.prosody.im/mod_muc_bot.html properly:
Component "muc.example.com" "muc"
modules_enabled = { [...], "muc_bot"}
known_bots = { "[email protected]" }
bots_get_messages = false
ignore_bot_errors = true