I'm not convinced about the connection being forhot water for several reasons.
1 You don't need two hoses for hot water. If hot water was circulated in the engines to warm them up for starting, it would just be discharched into the ocean through the usual engine cooling system.
2 It would be very difficult to keep the water hot enough in winter while going through a hose. I've never seen indications of any sort of boilers either portable or fixed along the quaysides meaning that such hoses would have to be several hundred feet long.
3 The picture of the Type IX from Snowman seems to be out on the water, with the hoses originating under the deck and going and going to the hatch. An unusual arrangement for power, but even stranger if it was for hot water on a boat that should have the heater and all the water pipes inside the PH.
4 While in port, it makes sense to have shore power to run ship systems so that the engines can be shut down for servicing and to give the crew a respite from the constant noise.
5 Some of the larger boats at my YC have more than one power cable attached while they're in port because one cable can't carry enough electricity to keep everthing running like refrigeration, A/C, fans, lights, radios, etc. And shore power connections even 30 years ago when I started boating weren't very good. 15 AMP power was common back then, while now 30 AMP is standard. I'd think in the 40's, the cables might have been even more primitive requiring two for a boat as big as a U-boat.
6 Diesel engines that I'm familiar with have "glow plugs" to heat them up before starting. These plugs would require electricity, not water.
7 If a boat needed hot water to keep the engines warm enough to start in Germany, how would the boats on the Murmansk Convoy Route have started their engines after surfacing in the middle of the winter during a patrol? Again, a glow plug, if required, would take power from the batteries.