Police officers have wide discretion, district attorneys have wide discretion, prosecutors have wide discretion, juries have wide discretion, judges have wide discretion. The laws they operate on and around can be dumb. We don't have a way for children to understand that.
A holistic approach is to address all of these simultaneously.