Hello,
What license and version of phpdocx are you using? Using MultiMerge class you can create two documents dynamically (with different headers and footers) and then merge them to get a single DOCX keeping their sections, headers and footers.
Regards.