Detecting a document that has tracked-changes from command line

We use LO in headless mode to convert user-uploaded .docx files to .pdf. This is all working fine. My client’s stated workflow is that users should export a version of the document without tracked-changes before uploading. I’ve now been asked if we can detect a user forgetting to do that, and thus be able to give the user a helpful warning.

This question is similar to another question here: extract track changes with command line, except that I don’t need to extract any change text. I merely need to detect yes/no whether a document includes tracked changes or not.

If I’m understanding the previous answer correctly, one solution would be to unpack the document, and grep the XML for the existence of at least one <w:ins> or <w:del> element, but that feels a bit of a hack. Is there a better way?