Duplicate contacts removal and restore database

My friend has 3 contact databases on his iphone. I combined all into his primary Apple ID but when I opened groups, it dropped many of the contacts from each group. He does the messaging for many Churches and there are a couple thousand contacts. Can you please help me restore the functionality? If I had a computer method to manage the database or whatever. I have the old phone he is migrating from. I tried selecting all in Groups app and send email but that was empty. I downloaded, combined, and exported all to gmail, then removed duplicates. I am ready to remove all contacts from apple id and restore the large file but am afraid we will lose all group members(?)

I probably wasn’t clear enough. I tried to export the lists in email as it allows, but it wouldn’t populate anything, just comes up as an empty email. We have no way to backup the lists. He has bought the full version of the software and we are open to doing more to get some help.