These statutes/laws are there mostly as a deterrent. They aren't as strict or archaic as many make out to be. Many visitors and foreigners visit and live here with no issues.
For instance, there are laws to prevent littering and it used to be that if you were caught littering, you could be forced to do community work by the Courts known as Corrective Work Orders (CWOs); requiring offenders to clean public areas for up to 12 hours. In reality, if you do not litter (and there are rubbish bins everywhere), you'll be fine and you can enjoy a clean environment to live in.
Death penalty or Mandatory Death Penalty (MDP) isn't "widespread". It isn't similar to some countries in the Middle East. It's only used in 2 occasions and the courts have discretion on whether to impose it - on drug offenses and murder cases. If the accused is purely a drug courier and is able to assist with investigations substantially, he/she may not face the MDP.
In short, if you live your life as you would anywhere else and do not dabble with drugs (alcohol is ok!), you'll be perfectly fine.