Under a transaction For review in Banking, choose Split across accounts and add a line for each account with its amount. The lines must add up to the transaction, and Left to split shows what remains. A contact can go on every line. The split is added as one journal entry, and Undo reverses it.
A bank Rule can now name a contact from Contacts. Entries the rule adds, including ones added from its suggestion, name that contact, so they count towards it in Income by customer and Spending by supplier.