Winning the war yet losing

It’s been several years since I read The Lord of the Rings trilogy, but for some reason I was thinking about it while mowing the yard last week. I was trying to ascertain the meaning of his ending (if there is one) in which the hobbits head home and have to free the place from oppression and restore its natural beauty.

It suddenly struck me that perhaps Tolkien was reflecting on his own experiences and thoughts about his homeland in light of World War I. Is the entire trilogy a warning that there’s no point in bleeding and dying to win a global war if you surrender your homeland to the same sorts of evils in the name of progress?