In this Dor of Chutzpa before Moshiach, with all of the “children at risk”, one must make sure that Torah and Yiddishkeit are “sweet”.
That is not to say that there is no time that would justify hitting a child, but it also must be done with sweetness, and only after deliberation, warning, and never in anger (and making sure your child knows it is not in anger). It should as a means for the lesson, no as an end as a punishment.
Usually, the lesson can be tought better using “natural consequences”. Of course, danger may force the need to use physical means (e.g. grabbing a hand hard to stop a child from running into the street). It may even hurt, but it is better then the other, C”V.