The UI should only edit configuration about database connection and LDAP queries for users.
I suggest you this approach:
- change the quota using nextcloud web interface
- save the modification time of configuration file
- if something later is changed, check if something else had change the config during that time