You asked, “How did God treat official executioners when he says 'thou shall not kill'?”
Exodus 20:13 says that you must not murder, not that you must not kill.
To kill is “to cause the death of”
To murder is “the unlawful premeditated killing of one human being by another”