Unpopular opinion maybe, but 90 day memory loss is a feature, not a bug.
Legal would probably tell you to purge anything older than 180 days, unless there is active discovery for a lawsuit, in which case retain until end of law suit. Retention is a legal policy issue, which may vary from company to company, and change when a new GC onboards. That should be driving the technical requirements.
(Not a lawyer, and thankfully, never deposed.)
I'm coming around to the idea that permanent chat history is not a good thing, but that's because the company I work at recently changed our workspace retention period to 365 days. You quickly realize how much you depended on searching for 2+ year old slack threads for the context behind why a feature works the way it does when it gets yanked away from you and all you're left with is an underused/disorganized Notion and the code itself.