Tolkien finished the Lord of the Rings after the second world war. The Hobbit was finished before the second world war. He was an academic man, his area of study included Anglo Saxon, and knew a whole lot about the Norse Sagas, and one of the things that really got on his nerves was the use to which the Norse Saga's had been put by the myth makers of Hitler's Germany as they went about building an account of the Aryan super race that was wholly entitled to rule the world in any way they chose to.
Inevitably people have read a great deal into Tolkien's work. By one interpretation the Lord of the Rings was about Stalin, which was another thing that got on Tolkien's nerves. He wasn't a big fan of Stalin by the Lord of the Rings had absolutely nothing to do with Stalin. It was a sequel to the Hobbit, which he'd written for his children and which had become popular with the wider society, grownups and children. And indeed today when devious people are looking around for myths to support particularly odious political positions it's as well we have academics.