Back in the days you would just lose all your message history anyway with text / AOL / MSN / facebook messenger / others… so I just started accepting it as a fact of life that you can’t keep your messaging history forever.
MSN/Live Messenger automatically saved chat histories as nice XML files in the user's documents directory, along with received files, so no real effort had to be made for preservation.
As for SMS texts, they could be backed up at least on later Symbian OSs, with the Nokia Ovi desktop app. On Android, backup apps would be able to do it as well.
At least in theory, EU directives for data portability (the "takeout" feature) should grant access to the message history for any abiding platform.
I think all chat platforms should have the decency to offer an export option, regardless of the underlying protocol.
Recollecting my message history from all sources into a common database is definitely high up in my project backlog.
What I mean is: your chat partners could archive your chats or some man in the middle. Better to know what you wrote, then to be blindsided later by somebody else who got hold of these archives.
i doubt that most of my chat partners have the capabilities to do that. and yes, it would be smart to make archives, but let the chat destroy itself after 7 days.