The cable is very important, and in case of on/off connections with iphones and macs, this was and is the foremost source of trouble. Even switching the USB port can make a difference here (my experience!).
BUT, this issue kept going on with the iphone of my wife, even though I switched through different cables.
Even resetting the iphone did not help.
In the end, the problem settled after I connected the iphone to the mac while being in my account instead of my wife's.
Afterwards also the connection within her own account was fine.
Very strange and very annoying behaviour.