Importing Many to Many Relationships

There is a bunch of stuff on the web on this going back years, but I want to bring it up to figure out if anything has changed or really if anyone can explain it to me in plebeian terms…

I need to be able to import and associate records in a many to many relationship.

For example, I am in real estate in NYC.

We are constantly researching who owns what apartment or building and want to import them into our CRM. Often a building will have 20-800+ units so we do that research in an excel file and then import the file en masse to start prospecting.

I have two custom modules (buildings and apartments) with a one to many relationship
— One building can have many apartments, but any one apartment can only exist in one building.

Then I have a many to many relationship with Accounts/Contacts/Leads/Targets to both the Buildings and the Apartments modules:
— An Account/Contact/Lead/Target can own a whole building; a building can be owned by multiple records (like a joint venture) or owned by one and managed by another (for example, a co-op is owned by the Co-Op itself, but it is managed by a managing agent. Both entities are important records and associations for us)
— An Account/Contact/Lead/Target can own more than one apartment in a building.
— An Account/Contact/Lead/Target can own more than one building. They can own one building and multiple apartments. (this is actually quite common)
— A building or apartment can be owned by more than one Account/Contact/Lead/Target (a joint venture, parents and children co-owning a co-op unit, the list goes on - some townhouses are passed down to heirs and list 12+ different owners, all are prospects for us)

All this is well and good, except that I can’t seem to figure out a way of importing a many to many relationship.

I want to be able to import or create the building and apartment units first, then find the ID of that unit/building and on the Contact/Lead/Target import, associate the record with the property they own.

As we import these on a per-building basis, we likely will not be importing more than one association with a building/unit at one time, but we want to update Accounts/Contacts/Leads/Targets that may be previously associated with other units/buildings and have the new association be an addition to the existing information.

Does anyone here have a any straightforward direction on how to do this? Ideally without programming, but if this requires a bit of heaving lifting I’m game.