Hello @Jordy
Be very careful with Nextcloud and migrating an OIDC setup.
I know that Nextcloud does not play well with these type of migrations.
Always test this with a clone from backup and a new installation with the same version where you select let the app handle accounts.
There is this app https://apps.nextcloud.com/apps/user_migration for user migration but still, proceed with caution.
I've looked into the LDAP to local user migration and have all SQL queries to do that, but not for OIDC to local user.
How Nextcloud behaves if you simply change the OIDC provider I can't tell right now.
So please keep us updated with findings.