Hello,
The time needed to transform a DOCX to PDF depends on the document complexity and the server performance. Unfortunately, there's no way to improve the time needed to transform a DOCX to PDF except using a faster server.
If you are getting a PHP timeout we recommend you test the same transformation using PHP CLI mode, so you can check the exact time the conversion needs.
An alternative in some cases would be transforming smaller DOCX documents (instead of a single big DOCX) to PDF, and then merge all PDF outputs into a single PDF using mergePDF (https://www.phpdocx.com/api-documentation/docxutilities/merge-pdf-documents-with-PHP).
The conversion plugin based on LibreOffice is usually faster than the MS Word one, but it requires DOCX that use contents and styles supported by LibreOffice.
Regards.