Our house has a gas boiler that's connected to both a closed-loop central heating system, and to a system involving a hot water tank and a cistern (through a valve that determines whether it indirectly heats the hot water in the tank, or the central heating loop).
The valve in question was broken for a long time, meaning that only the central heating system was working, and not the hot water (any attempt to turn on the water heater would instead send heat into the central heating due to the malfunctioning valve). We didn't turn the hot taps on at all during this time, apart from occasionally (but too infrequently) turning them on to flush the system.
We've since replaced the valve, but as a consequence, the hot water system has been unused for several years (we've been letting unheated water flow through it twice a year or so in the hope of preventing anything building up there, but that probably isn't enough). So I'm worried that the hot water system might be unsafe to use due to, e.g., bacteria or mold building up within the hot water system, or for some other reason that causes hot water systems that have been unused for years to become dangerous.
The information I've been able to find on this subject implies that there's some sort of need to prevent hot water systems becoming stagnant, and to do some sort of preparation before starting to use them after periods of unuse (when doing so is unavoidable), but I haven't been able to find out about the details (and most of the advice online is directed at much larger buildings).
What steps should I take before starting to use the hot water system again, in order to ensure that the resulting water is safe?