Hello,
You can serialize a DOCXStructure and get it as base64 content using a Premium license (and also use in-memory DOCX documents). Please check the following information:
https://www.phpdocx.com/documentation/cookbook/improve-phpdocx-performance (Serializing templates section)
https://www.phpdocx.com/documentation/cookbook/in-memory-docx-documents
Regards.