The Cambridge History of WWI records 346 executions for the whole of the British Empire, meaning a 0.00659% rate of men executed among the soldiers. The American and German armies had even lower rates and in the case of American armies strictly for murder and rape (I dread to look at the racial balance of those executions). Alexander Watson attributes it to a judiciary system closer to the civilian one for the Germans, which immediately started being decried as part of the reason they lost by the usual suspects. The French went through too massive waves of executions: 1914, "pour l'exemple", and 1917 against some of the leaders of the mutinies. In all, the French executed around 600, or 0.00838 of their soldiers. The KuK forces went a bit higher with 754 and the Italians had the highest rate (figures for Russia are not included), with 729 executions for 0.01302% with the infamous decimation orders instated by Luigi Cadorna.
That said, plenty of armies found ways to make people not condemned to death's lives uneasy at best, with some creating disciplinary battalions to serve in.