Usually, in situations like this, you just want to store the entire editor state (either as a JS object, or, if you need to serialize it, via EditorState.toJSON) rather than storing the document and history separately.
You can’t clear history. Just create a new state. When creating a new state with fromJSON, you can provide your serialized history in the JSON object.