Tolkien denied any allegory or symbolism in LotR, but I’m sure his worldview permeates it.
His symbolism is less direct and calculated than most symbolism in novels I think. That’s what makes it really fun.
Tokien said that he didn't write allegory. He didn't like allegory because the personificatins and symbols are reduced to one meaning only, the meaning that the author specifically intended.
He said that he wrote myth, and myth can be interpreted in many ways. Each generation will have its own interpretation, as will each individual. Here is the way C.S. Lewis puts it in his review of Tolkien's book:
What shows that we are reading myth, not allegory, is that there are no pointers to a specifically theological, or political, or psychological application. A myth points, for each reader, to the realm he lives in most. It is a master key; use it on what door you like.So, interpret it as you please. The book is rich in mythic imagery and invites the reader to find his own meaning.