@deprecated_ii It does not necessarily have to be execution, but any severe punishment. Countries like Singapore have far less crime because they will cane you if you for crimes like theft and robbery.
But we consider that too harsh of a punishment, so we just keep putting the same low time preference people in and out of prison when they clearly do not care about that consequence. That is, if we do put them in prison. At least prison deters some. Severe beating would deter even more.