On one hand, making a nanny who hit a child research and write a report on the effects of child abuse seems like an extremely good way to deter recidivism, and make an impression on the defendant.
On the other hand, making someone do an embarrassing public stunt seems like it would make them famous for the wrong reasons, severely handicapping their ability to find work in the future, to the point that it's ultimately worse than a short jail sentence. Embarrassing someone doesn't fix anything for them.
At least in the examples in Wikipedia, the punishments seem to focus more on making the defendant feel bad (in a hopefully educational way, not merely suffering), which is less good than making some form of reparation or restoration. The legal system already has a notion of community service as an alternative to jail; there is a lot of room for community service that uplifts victims while educating perpetrators.
For example, a nanny who hit a child could be sentenced to XX hours of sewing blankets for children in hospitals and orphanages.