I thought the battle of the 5 Armies in the Hobbit was also inspired by WWI.
ping
That’s a very well-designed battle. I did maps of it for the homeschool association’s Hobbit Club a couple of years ago. The text makes everything very clear, including the location of key figures as the battle progresses.
The siege of Gondor in “The Return of the King” is, in its details, the most reminiscent of WWI, in my opinion.