That's a very outdated view of traffic engineering and psychology. People (and animals in general) don't stop doing things in response to punishment unless they have a very high chance of expected punishment, way higher that any society could afford in case of traffic control.
If you want people to stop, you've got to build the infrastructure in a way that makes it psychologically natural to stop. Some paint on an otherwise Amercan road won't do shit. You've got to visually and physically narrow the space for drivers to make it uncomfortable or even damaging for them to pass through at unsafe speed.
That low speed is also slow enough that drivers don't feel like they're losing as much by stopping, making them feel like stopping for pedestrians is a lot more fair.
Look at Dutch traffic engineering standards for pedestrian crossings. They're a car-centric country that puts a lot of effort into getting cars everywhere in a relatively safe way.