Personally, I don't believe in installing fear into a child, but do believe in reasoning. With respect, 'galaxy', at 3.5 years they don't understand the difference between bad and good words or the reasoning behind not swearing.
At three a child can't physically protect themselves from having their mouth washed out with soap and water, an older child would struggle against it - and let's face it is an abusive act. Your actions will certainly teach your child not to swear in front of you, but who knows what will happen behind your back?