When you read about the number of desertions vs. the number of those actually executed for such it's really a very small percentage who suffered the firing squad (or even branding) - or so it seems to me.
There were two executions here during the war, both for desertion. The first was in January 1863, of a man named Thomas "Nicaragua" Smith. Smith was a classic ne'er-do-well, petty crook in civilian life, who the authorities could never seem to convict. Eventually, a couple of years before the war, a citizens' delegation took him into custody and forcibly put him on a steamer bound for New Orleans, with instructions not to return. He did eventually come back, though, was taken into custody, and enlisted in a Confederate regiment here. A while later he stole a boat and went out to the Union blockade fleet. He subsequently enlisted in the Union army -- quite the opportunist, Smith was -- and arrived back at Galveston on a Federal vessel in January 1863, unaware that Galveston had been recaptured just days before by the Confederates. Smith had the misfortune to be aboard a ship's boat crew that went aboard the pilot boat, and was recognized immediately. Smith was court-martialed, condemned and shot in short order, but there's no question that, had it not been for his long and sordid career here before the war, he might not have been sent to face the firing squad. Not too many people mourned Nicaragua Smith.
A very different case was a young man maned Anton Richers (sometimes given as Richter) who, in December 1864, stole a rowboat and tried to escape to the Union fleet. He capsized the boat on some harbor obstructions, and his cries for help were heard by some other Confederate soldiers nearby. Richers harmed himself further when he tried to bribe the soldiers who had rescued him not to tell. They did anyway, and he was subsequently tried, convicted and ordered to be shot. Desertion was becoming a very serious problem by the winter of 1864-65, and presumably he was to be made an example of. The day before his scheduled execution on March 3, 1865, a local clergyman traveled to Houston to plead for clemency from the District Commander, Major General Walker. Walker agreed, but the telegraph lines were down and the order to halt the execution could not be sent. The lines were not repaired and the message transmitted until 15 minutes after Richers had been shot dead. If the intent of the execution was, as they say,
pour encourager les autres, its actual effect was very bad indeed for morale, as a popular young man had been killed who should not have died.