#1 is poor design.
#2 is poor materials. If you don't really stay on top of your QC and incoming parts inspection, its not unknown for scummier low-bid suppliers to substitute other materials, especially if your buyer is pushing them hard on pricing. The ball in the valve probably was mild steel as it rusted so quickly.
#3 may be poor materials or may be your fault. If you fitted a replacement valve with a brass, cast iron or galvanised steel body it is your fault - electrolytic corrosion due to dissimilar metals. Its unlikely the pipe is ordinary mild steel. It would probably be showing traces of surface rust on its exterior if it was. If it is poor materials, its quite likely the filter end fitting was made from the wrong grade of stainless - recycled cheap cutlery or similar and the filter wan't passivated after drilling the holes. The dissimilar grades of stainless in contact + an anaerobic wet environment under whatever dirt had settled on it can lead to rapid crevice corrosion and rusting of areas depleted of surface chromium. If it can be dismantled, you can check the pipe interior for pitting and rust, and clean up and electrolytically passivate the tank end fitting. If it cant easily be dismantled, if you can take the valve off, you can probably inspect the pipe interior with a small dental mirror or similar + a white SMD LED on two fine magnet wires taped to it for illumination.
Worst case: if the pipe interior is badly pitted, you may need to replace the whole drain in silver-soldered copper & brass with a thin PTFE gasket between it and the tank (both sides) to electrically isolate it so it doesn't corrode due to electrolysis.
Also, I wouldn't leave aqueous cleaning solutions in it when not in use. As soon as its cooled down, drain it into a plastic can, and when you refill it, wash out the can to get rid of the sludge that settled out.