Hello,
Please check the documentation available on https://www.phpdocx.com/documentation/cookbook/headers-and-footers-for-sections . To work with headers/footers per section, you need to work with standalone documents and merge them. You can generate those DOCX using PHP methods or HTML Extended.
Premium licenses allow generating the DOCX to be merged using in-memory DOCX instead of files.
Regards.