That's true for a while. However, studies on the long-term efficacy of enforcement have mostly shown that enforcement has an effect for a while, and then wears off once enforcement goes away. So a community must be willing to accept long-term strict enforcement if that's going to work. Otherwise, once the police are gone, people eventually go back to their speeding ways. Speed cameras are effective, but publicity and warning signs are necessary for actually getting people to slow down. I think if a community is really concerned about pedestrian safety, the best way to do that means separating pedestrians from cars, and where they can't be separated, forcing cars to slow down, preferably by physical alterations like speed bumps, traffic circles, and other measures.
The DOT has a summary of various speed research in the page below, with some notes on the efficacy of enforcement :
Totally agree with you. Road alterations are best, speed cameras second best.