That lid looks odd. Are you sure there was no current going through there? The lid should only receive steam = distilled water.
Yes, looking at it, it appears to be directly connected to a screwed-in electrode. That's no good. It needs to be isolated. By having it act as an electrode, you evidently get a lot of bad reaction happening which spoils your product. I use a watch glass dish for that reason. A porcelain plate works too.
The DW could also be impure, but consider the other issue first.