Prosody is probably your best bet. It’s modular, easily configurable and is basically fully compliant with the XMPP specification. For your bridges however, I’d reccomend not going fully into XMPP because there are very little bridges available for it. As for dockerization, apparently they are not currently updating their dockerfiles, so this is another thing to take into account.
After conduwuit died, I just completely stopped using Matrix. I have zero faith in the current developers of these forks to not do the same bullshit that June did.