It’s already possible to customize PHP, see for example NS8 NextCloud single file limit - #5 by mrmarkuz
From the Nextcloud Github README:
You can customize FPM configuration by changing the file named
zzz_nethserver.confinside the state directory. Example:
runagent -m nextcloud1 vi zzz_nethserver.conf