Is putting soap in the mouth of a 3 1/2-year-old an appropriate punishment for swearing?
I agree with you that this is an aggressive overreaction to what is pretty typical behavior for a 3 1/2-year-old. Your daughter is at the peak age for saying "naughty words." Most kids will try some of these words at some point, usually not knowing what they mean. They do know, however, that these words have power, as evidenced by everyone's response to them, so they give them a trial. Overreaction tends to reinforce the power of these words and encourage repeating.
The best response is to let her know the word isn't nice and then, if she says it again, to ignore her behavior if possible. If this approach doesn't work, put her in a time-out and let her say the word as much as she wants; she will be by herself, with no one to shock or impress.
I think you need to talk to your day care provider to be sure that the discipline approach is aligned with yours generally, not just about this issue, and that the provider has a solid child development
perspective. Your daughter needs consistency, and you need to feel confident that your care provider is handling things as you would if you were there.