I don't think I'm understanding the problem.
If keeping the main door and having it locked is a priority, put two doorbells out front, labeled "unit A" and "unit B", or with last names if you are comfortable with that. If one or both of those is digital and has a camera or intercom, fine. The guest will press the appropriate button and it will either ring in the appropriate unit, or activate the camera/intercom for the correct unit.
For the locks, if you want to go digital, have a code for the main door that both units know, and then either a separate key or separate digital pad on each unit door. So the code to the main door is 1234, and then unit 1 is 5678 and unit 2 is 9999. Or key any of the doors to which you want to have locks. It's not terribly cumbersome to have to know two different codes or a code and a key. (Personally, I'd find two keys annoying, but not so annoying that it would affect my decision to rent a place.)