That’s the right way to go. If a user is deleted all his data will be deleted too. Unfortunately you’re nit telling us why you don’t want to delete the user directory and data. This prevent everyone from recommending possible workarounds.
Because in my setup the data folder is equal to /home/$user and there are other files in there besides the files folder from nextcloud, it will remove the whole nfs autofs /home/user directory with all the users data. This is not the behaviour I am looking for in my case.
Honestly, this is just a very bad idea. The primary storage is for NC alone, no other application should use it. You should use external storage for your usecase.
I have settled for the following configuration as option. It still seems to have some caching issues, that I hope will be solved in an new release of the external_files app.