We don't give an advantage to the offense (i.e.: take away an out like your sitch suggested), but rather penalize the defense. Our area has what we call the Casual Profanity Rule:
First offense is a warning to the team.
Second offense is an out to the offending team's next at-bat.
Third offense is an out to the offending team's next at-bat.
Fourth... fifth... etc.
It makes the team responsible for the mouth of their players. Might even DQ them, if it got bad enough. We wouldn't eject them unless it was flagrant.
Can get rather interesting when you've got a player cussing up a storm, and you're just standing there calling outs... 2 innings later they get to bat. (No, I haven't done that, bkbjones and StreamDoc
)