That's why we have judges and lawyers, so that the outcome can be decided as a communal process instead of just one person deciding what is punishable - even if the person is the developer building the automated justice dispenser and they'll be not around when the decision is taken, it would still be made by the whims of a single enforcer.