I remember reading and perhaps have this wrong that the Dalai Lama teaches that in the absence of full mastery of the Ego at least cultivating a Good Ego is an important step.
As I understand the Bad Ego is the self preserving, selfish, self directed Ego that views the world only from its own perspective and works to promote and protect itself (often at the expense of other people). The Good Ego is the noble ego that seeks to be just and help other people in promoting what is correct, right and truthful. The Bad Ego celebrates things like personal success and promotion, while the Good Ego celebrates things like making people happy and doing good.
Both are Ego in that they come from a self conception. "I AM." Taking on a noble quest to raise funds and build a hospital or school we can be driven by Good Ego. Facing all the troubles along the path we can battle them like a soldier winning step by step until the goal is achieved. We get the accolades and we see the good that we have done and we celebrate.
However being Ego it has weaknesses. Suppose we do all this and get no recognition? Suppose we end up in a life of struggle and we get to a point where we run out of energy and we can't go on. This is brilliantly illustrated in the film "It's a Wonderful Life" where the Socialist George Bailey despite best intentions gets beaten by the Capitalist Henry F. Potter and despairingly decides he is a failure and better dead. The rest of the film is having his Ego rebuilt by seeing that in fact his life has been a positive thing. This is the weakness of the Good Ego. Despite doing things with best intention, ultimately the Ego needs affirmation and when this does not come it collapses.
We can expand this syndrome in fact to be the essence of America. Listen to the lyrics of Frank Sinatra's "My Way." It details a broken person who celebrates that despite the outcomes they can still take pride in having been true to them self and having "done it my way." This is kind of the opposite of Bailey who worries they have failed. Sinatra's knows he's failed but prefers to put a tin hat on and suffer with his Ego instead. Sinatra no longer needs self-affirmation because he is so self assured that whatever happens he remains true to himself. But this is a pretty shallow and empty Ego which has just itself, and this is doubly hollow because it is actually the problem.
Ideally spiritual progress starts to weaken our grip on self so we can start to appreciate the greater existence that lies outside our self. That seems a paradox to the Ego. What version of me exists outside my Ego when my Ego is me. Well while we grip and remain transfixed by this perspective of events we will never know. When all you have is a hammer then everything looks like a nail. Likewise when all you have is Ego then everything looks like Me or not-Me. Breathing meditation while a tool to get beyond ego, raises an interesting question for the enquiring mind at the very start. Whose breath is this? Well we say it is mine, no brainer where was the challenge. But 100% likely you only noticed the breath when you were asked to concentrate on it. Whose breath was it when you were wondering where to sit for meditation? Who was actually opening and closing your lungs while you were distracted on other things? The thing to notice is actually breathing happens by itself 99.99% of the time and there are just those rare event when we take control for some reason like holding our breath, or probably when we start breathing meditation speeding up or slowing down breathing to make sure we do 10 breaths. Ego hovers around grasping to things, but actually on closer inspection breathing is not ours at all! If it was we would die the moment we lost concentration and starting thinking about other things because our breath would stop. Happily our body takes over, breathing is not "my" responsibility, in fact we never take breathing from the body even when we take control, breathing is done by the body not us! It is not ours! This is a very hard lesson for the Ego to manage.
But before our spiritual path gets into the depths of Ego we have another problem and one that is strangely common. Good Ego quickly becomes a pastiche. This is probably what our Ego thinks of itself, or some equally unlikely caricature (positive or negative):
We clock up a few good deeds and start to form the opinion that "I AM GOOD." This strengthens the Ego gives us confidence and leads us to greater things. But is also leads us away from reality. This is exactly how great spiritual leaders, politicians or anyone can be lead into "temptation." Believing we are Good we are at our most vulnerable to temptation. Suppose we are married. Normally we would challenge temptations to play around with other women. Our Authentic Good Ego would fear its reputation being damaged, and would be aware of the damage such activity would do to our partner and family. So our Good Ego works to protect us and lead us on the right path. However an Inauthentic Good Self that has come to believe that it "is" Good now thinks, well "I've earned a bit of fun", "what harm can it do", "I've done so many good things, this is just a drop", "I am after all Good so this is just good fun." This is classic Ego. Ego is the fake self, it is a small image of the self that we construct. It is a doll that we manipulate. With this doll it is easy to lie and fabricate things that are not true. Meanwhile the truth unfolds and we can deny and ignore it. So we end up in a adulterous relationship. Depending how big our Ego is we may be able to avoid the truth for a long time. When finally it dawns on us and our Ego breaks we cannot believe we have become what we have become. Catastrophic breakdown in self image as we realise we have lived a lie. This is why Good Ego still harbours all the poisons and deceits of Ego itself.
Another good example is embezzlement. You wonder how people can be so stupid as to abuse their position of power and take money. Are they already not on a good salary? At some point "being in charge" of finances leads to an Ego that feels entitled to make decisions over money, and then its s small step for this Ego to start justifying that it should have some. Perhaps believing "I will pay it back" and then pushing this commitment further and further away. Then when the size of the crime is too big to face, the Ego choses to keep believing the lie and drifts ever further into unreality and caricature. It looks crazy on the outside how this can happen, but by a process of small steps people end up living in fantasy worlds.
Another important example is Religious Piousness. There is that thought which goes "I have God on my side, therefore everything I do is God willed." This is extremely dangerous and I wonder if Israel has fallen this way. The problem with believing you are righteous is that your Ego will absorb all this to justify itself. Then you can drift off into complete fantasy and never need to check in with other people or reality.
The lesson then even for Good Ego is that really we must progress to challenge the "false image" fully and expand our perspective of the world beyond the manifest fabricated self. This is hard. A short cut is "faith." If we can follow Jesus we will get direct challenges to our Ego. But the path is long and rocky, and at each step the Ego will be hanging over us trying to replace reality with some fake construction of Self.