Hello,
You can query any content in the body document using DOCXPath. This feature is available in Advanced and Premium licenses.
Anyway, the replaceVariableByWordfragment method works perfectly to replace placeholders in existing footers when using template.
Regards.