The “OCR Items” Automator action accepts any file but imports the result. Just like the command Data > Convert > to searchable PDF.
I’m sure that such a script has already been posted but could find only your old request Import, OCR, and Delete — 2.0
The thread Wanted: Script or workflow to compress PDFs might be of interest too.