XMPP is often neglected even though it’s the most secure, private, fast, and reliable framework for end-to-end encrypted messengers.
This. I studied on how e2ee works in XMPP when I was trying it a few years back. It is absolutely atrocious. I have seen half-assed school projects with better security than most XMPP clients. Largely caused by encryption being bolted on through an extensions of the standard as an afterthought and going throug several revisions. Its usually not even enabled by default.
Now you may find a good client implementation, I think conversations for android seemd decent, but with everyone using a different client and no way to ensure the other side uses a secure one, there is little point.
I think Tutanota (or just Tuta now?) does this, since search works correctly.
I think not using PGP helps Tuta a lot with this, since PGP is really outdated and does not play well with modern features.