A futile act is "spitting in the wind." So is a selfless but unheeding act that "boomerangs" or has dire consequences the doer hadn't contemplated, an act that "did more harm than good."
"You don't tug on Superman's cape /
You don't spit in the wind / *or 'into the wind'
You don't pull the mask off that old Lone Ranger /
and you don't mess around with Jim."
Popular song, "You Don't Mess Around With Jim", ca. 1972,
James (Jim) Croce, singer/songwriter.
Lyrics copyright (c) EMI Music Publishing (as of this date).