If you have time Tom, I suggest Tom Shippey's book JRR Tolkien: Author of the Century. He addresses this topic as does the National Geographic film Lord of the rings:beyond the movie. As already mentioned the book was written during the 2nd world war. Tolkien did not like any reference to his work as "allegory", however, he would accept the term "applicability". This is significant as Tolkien perferred to leave the interpretations to the reader according to his environment rather than limited to what we suppose influenced the postAuthorID's writing. The themes in Lord of the Rings can apply to the early 20th century, the wars and the raping of the land by industrialization just as they can be applied throughout the world today. That is the neat thing about Tolkien and "applicability", it is timeless. Tolkien drew on his extensive knowledge of mythology and medieval history for the physical settings in the book. Good vs Evil, a timeless theme. One that haunted Tolkien, no doubt, through witnessing 2 horrific world wars.
Hope this makes some sense. I'm not good at writing off the top of my head in a forum, like this.
Good luck on the essay.