You can reduce the incidence of war crimes by (a) stomping the perpetrators hard when they occur, and (b) not deploying military force unless there is no other option. The fact that atrocities are an apparently inevitable part of war needs to be part of the calculation when evaluating the cost of military action.
The US is a notable failure at (a) as well as (b), and has been throughout its history. Hence, the US military commits an unusually large number of war crimes.