Is there a connection in meaning or etymology between schmettern (to fling, smash, hurl, spike, blare out) and Schmetterling (butterfly)?
aus dem Obersächsischen, wohl zu Schmetten; nach altem Volksglauben fliegen Hexen in Schmetterlingsgestalt umher, um Milch und Sahne zu stehlen
(possibly from the Upper Saxonian Schmetten; by old popular belief witches flew around in the form of butterflies to steal milk and cream.)
The article about Schmetten says that it’s another word for Sahne (cream) and comes from Czech, smetana.
So no, they are not related.
As idmean said Schmette means Cream.
You let the milk stay over night to let the cream settle on top of it in order to make butter out of it. If you didn't cover your bucket properly you had visitors in your Schmette, Schmetterlinge. That's exact the same origin and meaning of Butterfly.
The witchpart is new to me.