Hello,
encrypted/protected PDF documents can't be merged using the current version of phpdocx. Please check the information available on https://www.phpdocx.com/documentation/cookbook/repair-PDF about this limitation. Using gs or pdftocairo those encrypted/protected PDF documents can be repaired.
Merging protected PDF documents in mergePdf is a work in progress that is not ready to be used in production.
Regards.