The only sure-fire way to keep a water bath clean and free of slime is to clean it regularly. There are commercial biocides available for use in water baths which can extend the time between cleans, but check that the substance is not going to affect your samples and that it doesn’t require special disposal procedures. One old trick is to throw in a small piece of copper tubing or a copper-plated coin, since copper has antimicrobial properties. However, never risk damaging the moving parts of a shaking water bath with loose bits of metal. Also, I would suggest keeping the copper out of direct contact with the steel, since this might exacerbate corrosion on stainless steel that has been previously damaged.