Q:

Is there an English idiom that is equivalent to "throwing stones at sewage will only spoil your dress"?

There's a colloquial saying in Tamil that I am used to,

If you throw stones at sewage, it's your dress that will get spoiled"

It means if you try to change the opinion/behavior of a stupid/adamant person by offering them some good advice, only your reputation will be lowered because they won't be willing to listen to you. Apart from not paying heed, they would probably name-call or badmouth you in front of others causing embarrassment to you.
Just to give you some context on how this is used, let's say you spot a school going kid smoking cigarettes. You politely walk up to him and advise that smoking is dangerous to health and environment. But he is too arrogant and starts loudly abusing you in public.
That is, trying to help a person who is not willing to listen will only prove to be detrimental for your own good.

I found "You can lead horse to the water"TFD very close but I feel it doesn't convey the repercussions(sewage spoiling the dress).

Also, to shoot oneself in their foot seems equivalent but I think it is applicable to scenarios where you planned to harm the other person but ended up getting harmed. In my scenario, you approach someone with good intentions but end up abused.

Are there any other phrases that I can consider?

Update:
A possible duplicate has been raised citing Are there any English idioms to describe “futile benevolence?”
I am not sure about the other question but I should clarify that in my context, the person knows that their actions (benevolent or otherwise) could potentially backfire. Yet they decide to go ahead and confront. The original saying has a slightly humorous or warning undertones to it.
Example:

A: Oh my God! Look at those ignorant folks raising slogans against Vaccination...I will go and explain them about all the Vaccination benefits.
B: I suggest not. If you throw stones at sewage (attempt to correct things), it will only spoil your dress (causing harm/embarrassment/ill repute etc.)

Hope this clarifies.

A:

The quotation Never wrestle with a pig. You get dirty, and besides, the pig likes it is widely attributed to George Bernard Shaw. I don't know how true it is that he actually said that, but it certainly seems to convey the English-language equivalent of your colloquialism.

A:

A line similar to the pig one is “Do not argue with an idiot. 
He will drag you down to his level and beat you with experience.” 
Attributed variously to Oscar Wilde, George Carlin, Mark Twain (Samuel Clemens),
and others.
Reference: Origin of “do not argue with idiots”.

A:

It's like mud wrestling with a pig.  You'll both get dirty but only one will like it!  (Just saw Charl E's quote...mine's a popular expression I've heard, not attributable to anyone that I'm aware of.) 
(in honor of National Pig Day - March 1st)

