There are a few steps needed, it seems:
This says that it is possible to do sharing via the AccountContactRelation object, letting Community users see multiple accounts based on that object:
https://releasenotes.docs.salesforce.com/en-us/spring19/release-notes/rn_networks_sharing_sets_contacts_multiple.htm
There is a feature in Community setup called Enable Account Relationships.
https://help.salesforce.com/articleView?id=networks_partner_account_relationships_and_sharing.htm
This seems to be a good feature, but I haven't fully explored it, but it appears that you may need to enable that Account Relationships feature in Communities Settings to expose the AccountContactRelation-based sharing, since I didn't enable it, I do have that AccountContactRelation object in my org, and I don't get the sharing screen that's in the release notes.
So short answer: In a sandbox, check that box and try sharing via the AccountContactRelation object