Does the corrosion protection differ between an electric hot water cylinder and a heat pump cylinder?

No. The corrosion protection needs to be adapted to the water quality regardless of whether the hot water cylinder is heated by an immersion heater or connected to a heat pump.