Isn’t it true that Kipling wrote the poem after his son was killed in WWI?
Kipling's poem was a header (a custom of his) to the chilling revenge tale "Mary Postgate" (don't read it before you go to bed) which was published in the Pall Mall Magazine for September 1915. John Kipling was reported "missing presumed dead" a few months later.