Captain Coffin by Ben Stevens is a short story also available as part of the story collection A Twist in the Telling. I gave it four stars.
“Private Thomas Swan has been sentenced to death for desertion.”
I received a complimentary Kindle copy in an Amazon promotion.
That did not change my opinion for this review.
Link to purchase: https://www.amazon.com/dp/B00CSURCTW