One person writes calculate_attitudes(person)
Another writes calculate_abilities(person)
Another writes calculate_desirability(person, calculated_attitudes, calculated_abilities)
Another writes determine_spatial_location(person)
Another writes parse_list_of_protected_persons(whitelist)
Another writes move_to_safe_vantage_point(drone, picked_target, whitelist)
Another writes aim_cannon(cannon, spatial_location)
Another writes fire_cannon(cannon)
Another writes determine_witnesses(spatial_location, timestamp)
Then you just feed witness_person, witness_attitudes, witness_abilities into calculate_desirability, and loop it forever, killing the least obedient n%. No involved person really did much, or even anything, as far as they are aware.
Especially since you can, as Joseph Weizenbaum -- the one person HN really should know, but really doesn't -- pointed out, design/build/train those algorithms and machines with all sorts of rather benign stuff. E.g. you train for finding missing persons, but then you can also just feed it names and photos of dissidents instead of missing persons. The people "refitting" may know about the people who build them in the first place, but not the other way around.