Tolkien has repeatedly and explicitly said that he never wrote allegories for anything, and that he simply wanted to write a good story.
Of course he also readily admitted that his own experiences and views on life influenced his writing. He went off to fight in the trenches with his university friends and he was the only one to come back. This obviously leaves a mark. And if you read his writings aware of his views on Catholicism, then obviously quite a lot of that shines through as well.
But all of that is fairly subtle. The notion that this or that is an allegory for such and such is pretty much always wrong. Tolkien just wanted to write an entertaining story – nothing more, nothing less.
With a large work of fiction and a large set of real-world events, you can find allegories in everything. Doesn't mean the author intended this.
This is largely an issue of definition. When Tolkien spoke of disliking allegories, he was largely referring to the medieval tradition - https://slate.com/culture/2016/05/an-allegory-is-not-the-sam... - where you are quite explicitly making a direct connection to a specific thing.
He did, however, love to speak of "applicability," which many people would call allegory today. The One Ring, for example, is clearly meant to to embody power and the temptation of it/addiction to it. This is pretty unambiguously true! What Tolkien didn't want was for people to view The One Ring as some specific embodiment of power, e.g. the atomic bomb, and instead for readers to draw parallels to their own lives, experiences, and knowledge. To him, this was "applicability," but in the modern discussion of literature this sort of thing would still often be called an allegory.
The great thing about interpreting LOTR as an allegory for WW1 is it nicely explains the lack of female characters, without us needing to say critical things about an author we like.
Sadly my English teachers in high school wouldn’t accept this as a response to their request for an essay on Tolkien. It was extremely frustrating, to say the least, given his repeated stance on the matter.
I never said it was an allegory. I think you're confusing two ideas. One is whether the story in as allegory, and the other is whether Tolkien was inspired by one of the most significant events in the history of humanity.
He said if he had written an allegory it would have a different ending, as in if he wanted to preserve a one-to-one mapping things would have changed. But there are story types that are not allegories and which also are influenced by things.
Of course he also readily admitted that his own experiences and views on life influenced his writing. He went off to fight in the trenches with his university friends and he was the only one to come back. This obviously leaves a mark. And if you read his writings aware of his views on Catholicism, then obviously quite a lot of that shines through as well.
But all of that is fairly subtle. The notion that this or that is an allegory for such and such is pretty much always wrong. Tolkien just wanted to write an entertaining story – nothing more, nothing less.
With a large work of fiction and a large set of real-world events, you can find allegories in everything. Doesn't mean the author intended this.