It wasn't possible for me to fix this, either manually by hand or with the plesk repair tool. I decided to delete the hosting account completely and start over, which meant I had to transfer the whole Nextcloud instance again, but it now works perfectly.
I don't know what went wrong the first...