There are some variations on the theme, like the Modern German Molkendieb meaning ‘whey thief’, and even the Dutch term boterschijte, literally meaning ‘butter shitter’.
On the face of it, it looks like there was a shared belief among Germanic speakers very early on, that these insects had some connection to butter: either eating it, thieving it or shitting it.

There is debate, however, over whether that’s true. A competing theory is that the word butterfly has nothing to do with butter, but comes from the Old English bēatan meaning ‘to beat’. So the root word might’ve been more like beaterfly.
That would make more sense, because butterflies beat their wings far more often than they eat, thieve or shit butter. But it doesn’t explain one of the German variations I mentioned earlier: Molkendieb or ‘whey thief’. With this word, the concept of butter is there, but the word Molken can’t possibly be a just a mutation of bēatan - it’s a completely different sound.
I can’t find much info on the word Molkendieb so I don’t know if it came after the word butterfly, as kind of a joke word, but maybe a German speaker can help me out in the comments.
Finally, one theory that isn’t given much credit is that butterfly is a mutation of flutter-by, which you might’ve heard. From what I’ve read, that’s a myth.