I built the F-Droid system images using the AOSP source code without any modifications.
To include the privileged extension it simply needs to be placed in the AOSP source tree, and then built via PRODUCT_PACKAGES += F-DroidPrivilegedExtension
You should definitely generate the XMLs via the script, that’s what I did for the system images.
F-Droid / emulator-system-images · GitLab contains the scripts and files used.