I have the same problem.
I did it with a workarroud. Nextcloud uses SabreDav in the background, which can be accessed with a WEBDAV client.
I downloaded the vcards directly from the old installation and copied it to the new installation.
All my contacts appeared again.
E.g. with KDE’s Dolphin you can type in the address field:
webdavs://serverAddress/pathTo/Users/AddressBook/
However, there is still a problem.
When I export the contacts and import it again, there are still errors.
I tried to find a certain contact which might not be properly formated, but it seems not to be special contact.
May be it’s to many, I have >1000 Contacts …
But even with 100+ i came across that issue.