I’d like to second Snikket - it’s designed for this use case and is very simple to set up.
If you’d rather not use Snikket, check out these recommendations for clients and servers.
Hope it works for you! Feel free to reach out if you have any questions.
It’s not perfect yet, but it’s much, much better than the old days.
OMEMO is supported by every major client, and they interoperate successfully. Unfortunately, most clients are stuck with an older version of the OMEMO spec. It’s not ideal, but it doesn’t cause any practical issue, unless you use Kaidan or UWPX, which only support the latest version.
All popular clients and servers support retrieving chat history now too.
In practice, I’ve been using it for several months to chat with friends and family, and haven’t had any issues.