For chat apps, I don't think the problem of "data scattered around backend-DBs" is a real concern. E.g. Zulip has a well-defined data export format that's easily parsable JSON and contains all non-transient data (i.e. the status of who's typing right now isn't included): https://zulip.readthedocs.io/en/latest/production/export-and.... And so do most of the other popular chat systems.
I'd be surprised if Zulip doesn't still run in 20 years, but in any case, we have data import tools for the export formats of Slack, Mattermost, Gitter, and HipChat, and ultimately it wasn't that much work (The most recent few we've added were each a few person-weeks' work). So I think we can safely assume that at least for chat, it'll be possible to import the history.
But even if they don't, there are already scripts to export the public history of a Zulip organization and turn it into a webpage that can be hosted wherever (see for example: https://leanprover-community.github.io/archive/).
The https://zulipchat.com homepage and https://zulipchat.com/for/open-source are relevant reading for folks considering Zulip for their open source project.