The fix to the dishwasher was as easy as buying a replacement cable guide.
I had to restore the broken white wire and add insulation to the other wire with visible copper. The cable guide slides underneath the body: just push it from outside, both sides already wrapped around the cables. Pay attention to position properly the nibble against the body so that the guide does not slide away when moving the lid.
The replacement part costs anywhere between 15 and 25€, depending on your source. I chose a real shop as we have quite a few in town. The human contact was invaluable: "yes, I have it, but I don't know where." According to the shop owner, it doesn't seem to be a common problem on those Whirlpool dishwashers. Or perhaps we have already used it past the design duration time, when a larger fault would force people to buy a new one rather than repair it.
Case closed.