Which table of music app stores the location of music files on disk?

Yes, deleting files directly from the server file system is not recommended. But if you have set up the Nextcloud PC client to sync the cloud files, then you can delete the files on your PC and the client will take care of deleting the files from the server the right way.

For reference, there’s also another discussion about the same main topic: How to get songs in specific playlist of music app?