Hi Michael,
I've replied also to your support ticket. I recommend using the built-in feature for importing contacts: Importing contacts. If you split your CSV file per every contact group, you'll be able to import them into predefined contact groups and also keep their relationships.
If importing via Import toolkit throws timeouts, another option is to import contacts via API: Creating contacts and Adding contacts to a contact group.