HOWTO remove inherited membership when corresponding relationship is disabled or deleted?
After trolling around some more, the field I was looking for IS in the membership table, owner_membership_id. That is non-nil for inherited memberships. You can follow that key to the parent organization's membership record, and then from there, determine whether that is the organization for which the membership should be deleted. For maintaining history, you can just cancel the individual's inherited membership instead of deleting so it will show up under past, inactive memberships. If done properly, there will never be more than one inherited, active membership for a related (individual, organization) pair unles the organization subscribes to multiple memberships at once.