And now I have optimised the macro, so that it does not create the temporary folder.
This was done after reading @peternlewis method to pass multiple paths to the execute script action here: Run Single Command on Finder Selection
Keyboard Maestro 8.1.1 “Merge selected pdfs to new pdf-v2” Macro