If you not need too much files you can look at https://apps.nextcloud.com/apps/sharingpath
The actual problem is the fact that Nextcloud uses “rewrite” (file. htaccess). Perhaps you can configure another virtual host, set another rewrite file name (not .htaccess !!!) and then set the webserver to the nextcloud-data-user-dir. I think that would work fine.
Hopefully you can set it in the virtual host settings e.g. of “files.server.tld”:
If you want to call your
.htaccess file something else, you can change the name of the file using the
AccessFileName directive. For example, if you would rather call the file
.config then you can put the following in your server configuration file:
In the file or perhaps also in the webserver config you can hide the old an the new .htaccess-file.
Sorry, not tested.