It looks to me that what
Tolkien didn't like was 'one-to-one' representations, where an entity in the story directly represents a specific concept or entity in some aspect of the real world (or in something intangible like ideology). For a very obvious example, think of
The Pilgrim's Progress, where each character is named for what they are supposed to represent.
Many-to-one or one-to-many relationships, on the other hand, will always exist in a storyteller's
tales, as they cannot create in a void. The storyteller draws subconscious (and conscious/purposeful) influence from a variety of sources, and these get taken apart into larger or smaller elements (like molecules, more recognisable, or like atoms, too 'divorced' to tell) and finally put back together into a variety of new things.
I haven't thought that much about
Gandalf (he's a bit hard to pin down for me), but here is my interpretation of what happened with
Sauron:
Sauron looks like a cautionary tale to me. At first, he is someone presumably very inventive (as a
Maia of
Aulë), who loves beauty and order. He also values efficiency. He is awed by the sheer power of
Melkor, who does whatever he wants with total disregard for the other
Valar, as they cannot really contain or restrict him easily. If Sauron had such power, it would allow him to be even more effective in bringing his designs into reality. Kind of like the 'dark side' in Star
Wars, it would make everything quick and easy. Therefore, he decides to join Melkor and learn from him. Though I don't think the motive was just for power gain alone. Sauron might have hero-worshipped Melkor somewhat, and actually looked up to him. Ironically, if someone is obsessed with order and perfection, they can end up feeling restricted by their own rules and standards. Someone who has the 'courage' to break the rules and not care about boundaries may attract their admiration.
Later on of course, Sauron decides to 'improve' upon Melkor by not expending his power haphazardly and needlessly weakening himself. Instead, he puts all his eggs into one basket by creating
the One Ring. With this instrument he is at near peak effectiveness when it comes to dominating the world to match his sense of order. But with all his focus and power directed into this one goal, Sauron now has tunnel-vision and a one-track mind, and he has lost his wider range of inventiveness and even his appreciation for beauty (
Mordor is a pretty awful-looking place). He now cannot understand anyone with a different mindset than his own, which means he doesn't realise there is a plan to destroy
the Ring until almost the very end. He used to be able to do this, given that he got along well enough with Melkor (and he was an able manipulator in the
Second Age).
Basically, Sauron, in his quest to find himself, lost himself. He wanted to use his talents and abilities to their fullest extent, and in the end chose the path that would end with him losing them all. Though it is not a bad thing to want to reach your full potential, you should do it mindfully, and not 'at all costs'. Your freedom ends where the freedom of others begins.