Here is a good article about protecting cooling systems from corrosion.
Here is a part of it talking about how corrosion protection is achieved and as it says, it's mainly though pH control and inhibitors. I already mentioned that mixing coolants can affect it's pH level and that alone can cause corrosion issues.
Quote
Protecting against corrosion
In general, corrosion can be reduced through pH control and corrosion inhibitor use. The inhibitors attach to the metal surfaces to passivate them and prevent corrosion. It is also important to maintain a stable water flow to avoid stagnant zones inside the cooling system, which can cause corrosion.
Quality of water also needs to be considered when trying to prevent corrosion. The corrosive effect of natural water can vary considerably depending on its chemical composition. As mentioned earlier in this article, chloride is corrosive and use of tap water should be minimized or avoided if it contains more than 100 ppm of chloride. Hardness of water also needs to be considered because it introduces calcium and magnesium, which form scale on the metal surfaces. Deionized water, demineralized water, or water that has been passed through a reverse osmosis process to remove harmful minerals and salts is highly recommended in order to avoid chloride and scale buildup. A suitable corrosion inhibitor must be used with deionized or demineralized water.
There are different inhibitors for use with different metals, each with its advantages and disadvantages.
Phosphate is an effective corrosion inhibitor for iron, steel, lead/tin solder, and most aluminum components. It is also a very good buffer for pH control. One disadvantage of phosphate is precipitation with calcium in hard water, which is one reason that deionized water is used for diluting a glycol/water coolant.
Tolyltriazole is a common and highly effective corrosion inhibitor for copper and brass.
Mercaptobenzothiazole also works for copper and brass, but it is not as stable as tolyltriazole.
Nitrite is an excellent corrosion inhibitor for iron. At high concentrations, this inhibitor is corrosive to lead/tin solder.
Silicate is an effective inhibitor for most metals but it tends to form thick deposits in cooling systems. The rust inhibitors in the automotive anti-freeze may cause premature failure of the pump seals.
Chromate and soluble oils have been used in the past, but their use has greatly diminished due to their toxicity. Modern inhibitors have replaced them.
https://www.lytron.com/Tools-and-Te.../Preventing-Corrosion-in-Cooling-Systems