Looking for an AppleScript that can be added to Hazel, the script will remove the original OCR layer and then reapply the OCR

Not an automation, but perhaps a starting point: Rose talks about converting a PDF to an image and back to get rid of a wonky OCR layer in this post.