Hello,
UPDATE: Generate different headers and footers for multiple sections
What license and version of phpdocx are you using? The easiest approach is using the MultiMerge class included in Corporate and Enterprise licenses that allow to merge DOCX keeping their own headers and footers.
Regards.