I'm experimenting with Prosody and after setting everything up it appears to work, I have lines like this in the /var/log/prosody/prosody.log file:
May 31 11:09:40 mod_bosh info New BOSH session, assigned it sid 'XXX'
However it appears that I can only login to Nextcloud after disabling the OpenOTP Two Factor Authentication app via occ app:disable twofactor_totp — is JavaScript XMPP Chat incompatible with OpenOTP Two Factor Authentication?