I would try signing out of iCloud on both Macs, signing back in, let it sit for 10 minutes and try again. If its not resolved then I would sign out of iCloud on the iPhone.
I did it in that order because sometimes signing out of the iPhone can be a pain. Not always but for example I had Watch issues, and then Wifi issues, might be isolated problem but I wouldn't tempt fate.
Anyway that fixed sync'ing issues I have (contacts once and keychain once). I'd try to narrow it down because it can be random. So in your case I would try to isolate it to a single device by making a new contact from each device (ex from the iMac make iMac Contact, from the iPhone make iPhone Contact, and from the MB make MB Contact). See if any of them doesn't receive or send a contact. Log out and back into iCloud for that one. My work iPad was changing on 5gb of messages in iCloud that wouldn't unsync/delete so again I had to narrow it down.
Its rare but very annoying when it doesn't just work.