Strategy for clearing history?

I was wondering, is there suggested strategy for cleaning up yjs doc. Have a hobby markdown/wiki where I am storing state of documents on server in sql database.
For one often changed document with mostly links I am in situation where it contains 76 bytes of text but its base64 encoded yjs state is 65Kb and applyUpdate starts to take considerably more time.
I was thinking about finding a condition under which I create a new doc on a server, insert text from old one, this way erase history so new connecting clients get that.
But as far as I can say this may lead to occasional loss or duplication of text depending on how I handle case where there was client that still had state from before erasure.
Did anyone encountered such a need? Issues with slow applyUpdate in almost empty document. Any strategies to clean things up occasionally?

I have the same question, appreciate any suggestion