I don't think a public hanging would have a great effect on crime rates. And I personally think we already have too many prisons and too many people in them. (people who have committed "victimless" crimes)
Based on what I've seen, the big issues we have all start with the family and community. Broken families, and broken communities. And government programs don't fix it. In some cases, they make it worse.
There are a lot of parents these days that aren't very interested in putting the work in of parenting. Some are just disinterested, and others try to be their kids friend instead of a mom or dad. Some see their kids as an unwanted burden, and I imagine most of the criminals start out in those homes.
I grew up in a small town where nearly everyone's people had been there for generations. People knew you, and they knew your family. The little old ladies would gossip at the hair salon, or call each other on the phone. If you were acting a fool, people found out. Word got around. If it was bad enough, someone would call your parents or grandparents directly and let them know. And when your father/grandfather found out, you got your backside tanned. We didn't have a local police force, and the county sheriff's department was on the other side of the county. But due to community responsibility, gossiping ladies, and good parenting, crime stayed low.
These days, people move all the time for work or housing. Folks don't take the time to get to know their neighbors. Aunts, uncles, and grandparents span across 5 states. That sense of community responsibility is lost, and police are a poor replacement for that. Government has no business trying to raise kids.
I think this has all been part of the long-game that socialist have played. Break down the family and the community, and make the government its surrogate.
TL: DR, Strong families and communities would solve a lot of our issues.