I can't imagine that it's that they think children can be be damaged in some way by knowing how to curse.
I imagine it's more that children will think these words are fun new toys and will constantly repeat them, enjoying how much of a reaction they provoke. And that the parent 1. will feel sad that the child now has this verbal crutch that they may end up leaning into in the future in place of learning how to speak eloquently; and 2. will feel ashamed when others in the community see the child swearing, and assume that it's a behavior that the parent inculcated into them by swearing constantly in front of them, rather than a behavior the parent tried their best to prevent — but which the child inevitably picked up somewhere outside the home.
There's probably something analogous here, right? Being exposed to "graphic imagery" is not really damaging per se. Rather, seeing such things just shifts a child's potential repertoire of behaviors/responses slightly (think: being desensitized enough to such imagery to find it funny to use to troll others in a school computer lab), in a way that might be assumed by others to have been a direct consequence of the parent's actions (e.g. by having sex / watching porn in front of their children.) Such behaviors by the child will reflect badly on the parent's parenting, even if they were actually purely the result of the child's self-motivated idle curiosity.
In short, these things — a child swearing, a child sending pictures of gross buttholes to other children — are conflationary triggers for community shaming of the parents: they cause behaviors in children that could well have been caused by bad parenting, and so tar the parents with the brush of being bad parents, whether or not the parent is actually bad.
Parents don't tend to like being shamed by the community for bad parenting, when they don't believe themselves to be bad parents; so they treat any such "conflationary triggers" for that shaming, as taboos, things to avoid their children witnessing, even if those things aren't "damaging."
This is a selection bias. By definition, all the survivors of the most atrocious things can say "I went through XYZ and I’m still alive". That doesn’t make this XYZ something you would recommend to anyone.
Everyone has a butthole. Do kids never look in the mirror? Do kids never explore bodies? We spent 100k years or more looking at each other in the nude and somehow our species didn't all go insane.
Nakedness probably doesn't hurt anyone.
"Hey come check out this amazing magic eye". Boom!
I see what you did there.