If that solution is so simple, wouldn't the country with highest incarceration rate be the safest?
And to answer your question, no because there are other variables. Some populations simply have a larger share of criminals.
https://www.reuters.com/world/americas/el-salvador-murders-p...
How you enforce laws effects the crime rate, having your jails full doesn’t mean you have effective law enforcement.
But yeah, keep pretending the solution to crime is hard-line policing, and not public policy.