Have you considered any answer to this question Migrating existing Nextcloud user account to LDAP already? There is mentioned a manual solution with some database manipulation as well as a semiautomatical solution using the User Migration app.
Update: This post also mentions the transfer-ownership solution.