The easiest solution would be to use https://github.com/freedomofpress/dangerzone - it basically renders input PDF (or makes it PDF first if necessary) and than output rendered pixels as new PDF.
The upside - no JS and other crap can survive the process. The downside - you loose clickable links, copyable text etc.