This post/question is referencing the iphone macbook connections issue reported by @Avelj (thanks for your details analysis, that helped a lot) in detail in this thread:
iPhone-Mac connection issue and what does the usbd process do?
But since you have to have "reputation" points to submit an answer not least a comment I am forced to open this new thread instead!!! (Well, not such a good system at last)
I might ramble a bit, tl;dr at the bottom...
The issue:
As presented in the referenced post connecting an iPhone to my MacBook Pro Mid 2015 (MacBookPro11,5) would result repeatably in disconnecting and reconnecting the iPhone. This would make the connection impossible to use for Ethernet or Sync and affects also the performance of the MacBook: Every time the iPhone would disconnect the MacBook would freeze for half a second, being very visible when watching a movie/show on Netflix. This bugged me for years as I could not understand what the issue might be.
It was reported that this could be solved with either a new lightning cable or disabling the usbd process on the MacBook, but in case of the cable would probably resurface only month later. Both solutions are dissatisfying, as I for one wouldn't want to purchase a lightning cable every month or so. And second disabling the usbd process via sudo killall -STOP -c usbd
would solve the freezing but reduce the charging power to abysmal 300 mA.
The investigation:
I tested various iPhones (XS, XS, 8, 5, 4) and all showed the same issue. I used different lightning cables, no change. I used a different Macbook Pro (2008) and a a Mac Mini - same with the old MacBook, but the Mac Mini works like a charm.
So I took a closer look at the software stage but soon realized that the issue could not be resolved this way, as it probably hat to do with charging power and connection issues from the iPhone itself, as the connection would only fails as the charging power increases.
Therefor I checked all parameters regarding this and found iStatMenu to be a very good tool to check the charging power. The 5V USB rail showed a consumption of 0 mA for a suspended state and ~20 mA for active state with no USB accessories connected. This consumption ist most likely the standard current draw from the Trackpad and Keyboard connected to the USB controller internally on the MacBook Pro 2015.
Then I connected the iPhone to either USB ports and could monitor the current consumption: With a disabled usbd process it would rise to 500 mA consistently and be very stable. But charging the iPhone this way would take ages and in some cases, when the iPhone was used aside the MacBook result in no charge at all.
When resuming the usbd process with sudo killall -CONT -c usbd
the current draw would increase to 600 mA or more but be very unstable and drop back down to 400 mA resulting in a buzz from the iPhone reporting a dis- and reconnect.
You can actually see this in the following picture: A depicts the active state without USB connections. B the connected iPhone with usbd disabled. C with usbd enabled. The current draw reaches 600 mA and brakes down before reconnecting again and again.
The final solution and my opinion, on what causes this issue please read my own answer below... :)
TL;DR: The issue of reconnecting iPhones on Macbook/Pro seams to be repeatably caused by the USB sockets in the MacBook and/or the USB connectors on the used lightning cable. Contact resistance of the connector prongs makes the iPhone disconnect and reconnect in high power charging mode.
usbd
software process that I alluded to? This actually kinda makes sense, because it is my left USB port that works poorly but my right hand side USB port connects fine with my iPhone. I've just double checked Apple's work order from September 2019 and they only replaced the right side I/O board and not the left! Thanks a lot for all your effort :)