Well, "schmettern" (verb) literally means to smash or to belt something. "Schmetterling" comes from the old Slavic "Schmetten", meaning cream (the one you skim off milk), but it sounds more like it comes from "schmettern", which is a word still in use.
The "schmett" makes me think of the mess that's left if you squish one.
EDIT: Curious about the etymology of the German word, and the "schmett" part means "cream," which is similar to the "butter" part we use in English. The closest word an English speaker might recognize is probably the Yiddish "schmir."
It's basically an insider from a German meme community here on lemmy. The community is called ich_iel (a translation of me_irl) and people use bad literal translations from English as a joke and call it Zangendeutsch. Butterfliege is a literal translation of butterfly but not the real translation.
Someone once told me to that words for things that are not traded across linguistic borders exhibit more linguistic diversity (as in, neighbouring countries use completely different words that share no common etymological roots etc.). Butterfly is one key example.
A schmetterling is the approximate amount of shit one spackles into the bowl of the toilet after a particularly fibrous day. It's not so much that it clogs the plumbing or anything, but it certainly leaves a schmetterling of evidence behind for the next man to attempt to knock loose with his stream.