It’s a multi step process, but if you still have the XPS Viewer from windows 10, you can ‘print’ the file to XPS, then open it in the XPS Viewer and ‘print’ to PDF using your favourite print to pdf solution.
That strips the metadata but doesn’t rasterize everything.
I tried that before, but was unsuccessful in clearing out metadata. Whatever options I tried, PDF-to-PDF just output an identical file with a different name.
You could write a script to automatically watch for new files in a folder and strip metadata from every file i guess. I had done something like that for images way before.