Auto-set country code
You can get the selected country code with sudo raspi-config nonint get_wifi_country
Maybe copy that output to the RaspAP country code?
The selected country code is set with iw reg set:
https://github.com/RaspAP/raspap-webgui/blob/7883514f40d1aba0d1398b738ab1099f528258e8/includes/hostapd.php#L595-L608
I misread your feature request. Yes, the country code could be assigned this way.
This is what I found to automatically set country code after the install. Maybe you can find a good place to put it in the installer?
tag="country_code="
find=$(cat /etc/hostapd/hostapd.conf | grep -a "$tag")
replace="$tag"$(sudo raspi-config nonint get_wifi_country)
sudo sed -i "s/$find/$replace/g" /etc/hostapd/hostapd.conf
raspi-config returns the regulatory domain value that gets applied at boot time. you can find this in /proc/cmdline:
cfg80211.ieee80211_regdom=US
In my case, I set to "US" in the RPi Imager tool. RaspAP uses iw reg get/set (as above) which interacts with different parts of the wireless stack. This is what WLAN drivers and the kernel actually use to determine channel restrictions, etc.
So hostapd.conf could initially be populated from raspi-config, but thereafter this is ignored and iw is used.
As long as hostapd gets on the same country code as Raspberry itself.