This has come up before, to an extent.
General consensus so far has been that questions that ask about corporal punishment shouldn't be automatically closed. Questions should be closed because they are off-topic (or unclear, or not an appropriate format for the platform, etc.), and not because people disagree with the premise.
I think that should apply to answers, as well.
I don't believe answers that advocate corporal punishment should be deleted or censored. However, I frequently make a point of downvoting them, and explaining why. It really depends on how they are worded, and the overall quality of it. An answer saying "spanking was good enough for my parents to use on me, and I turned out okay, therefore it's a great method" without any further references or explanation is usually an example of what I feel is low quality, and I'll likely downvote as a result.
On the other hand, an answer that advocates spanking, but includes some clarification as to how it might be applied, how not to use it, and includes some practical advice such as "never use corporal punishment while angry" is not what I consider low quality, even if I personally disagree with the premise. I likely won't upvote answers like that, but I probably won't downvote them, either.
In point of fact, the overwhelming rejection of corporal punishment isn't strictly based on the idea that it doesn't work. Indeed, the American Academy of Pediatrics' 1998 Policy Statement on Corporal Punishment, which is widely cited as one of the primary justifications for not using corporal punishment, acknowledges that it can be effective, in some limited circumstances. However, it qualifies that by pointing out that correct use is difficult to the point of being impractical, and is not any more effective than other means.
There are a significant portion of people out there who see our movement away from corporal punishment as the reason for a host of problems. I have yet to see one single compelling piece of evidence supporting that opinion, but people maintain it nonetheless.
I don't believe it is appropriate for us to delete or censor content simply because we believe they are wrong.
I also don't believe it is necessarily appropriate to censor or delete content because we find it personally offensive. That is entirely too subjective when it is the position they are taking that offends us, rather than the tone or phrasing.
Consider, for example, religion. Answers that advocate specific stances on religious upbringings may be offensive to people of specific religions, atheists, or both (and note that atheism faces strict legal persecution in many countries, so the argument that many countries ban corporal punishment does not distinguish it from discussions on religious answers). Should a question that asks about teaching a child to pray be closed because some people think children shouldn't pray? How about answers that say "you should make your son pray" vs. answers that say "wait until he's old enough"? Some people could be offended by either side, yet I'd argue that both are valid responses for our platform.
The merits of such responses are determined by how people vote.
If you think corporal punishment is bad (and personally, I agree!), find answers that suggest that people use it, and downvote them if you think they offer harmful advice!.