haha I wrote something like this in python once.
xmldata = ZipFile(docxfile).open("word/settings.xml").read().decode()
xmldata = re.sub("<w:documentProtection .\*/>", "", xmldata)
=> I wrote it for my personal use and for a few friends, and it is unfinished and not very well written, but if it can be useful to others, my little tool is here https://github.com/karteum/Doctool