So that explains why chat history has value in itself without just storing outside the important info on a given moment.
But sure, the best thing to deal with that is to be able to 'backup/export' your history and also being able open/import it in a usable form.
Whatsapp mostly fails on both topics. You can't easily backup, otherwise it would be stored in clear in google drive, in an area that is not even accessible to you.
And then it is a sqlite db with proprietary format for fields, so so far nothing can display it properly offline.
For telegram, they have a good export/backup feature.
I don't know of anytool that would allow to browse your history nicely when loaded offline from backups, but as the format is open, that should be doable.