In your Before Commit Microflow concatenate both keys and store in the attribute. Since this attribute is Unique, you are not going to get duplicates for that foreign key. Made sense?
Parent Entity(Attribute: Key1) ChildTable(UniqueAttribute,Key2) – Before commit to ChildTable (UniqueAttribute = key1+key2). This way you are cheating to get a foreign key relationship into the ChildTable.