in the Foreword to the Second Edition of The Lord of the Rings Tolkien refutes the claims that his epic was inspired by WWII noting that if it had served as inspiration then
Saruman, failing to get possession of the Ring, would in the confusion and treacheries of the time have found in Mordor the missing links in his own researches into Ring-lore, and before long he would have made a Great Ring of his own with which to challenge the self-styled Ruler of Middle-earth.
Imagine that with me for a moment if you will. What a different meaning the title The Two Towers would have taken. And what a different story it would have become. It would be a darker tale, that is for certain. A tale very much lacking in hobbits who “would not have survived long even as slaves.”
I think we can all be thankful Tolkien found his inspiration in other countries Places than in the current events of his day. By drawing on older and deeper truths he was able to craft a story of lasting significance beyond what he ever imagined. And we are all reaping the benefits of that today.