The ego is simply a state of split mindedness in which your will has started to will against itself.
This is the result of you attempting to will against God's will.
It now seems that something is attacking you, and that you are also an attacker. This makes you both a victim and a victimizer simultaneously.
The ego is not "that which is against you". That's only HALF.
The part of your mind which is split off from the rest, typically is made unconscious and projected and labeled an enemy, while the other part of your split mind is retained in conscious awareness and thought to be "your self".
To that limited conscious self, the rest of the mind/will seems to be opposed to it. To suggest that only the opposing alienated/unconscious will is "the ego" is an error, and it's how the ego keeps itself intact by blaming the other part of yourself for all sin.
That which seems to be against you is simply your own will, or part of it, which seems to be against the rest of your will. You are BOTH of them, and you are playing both sides of the war!
It is actually the SEPARATION BETWEEN the two parts of will, which needs to be undone. So that some part of your will is not willing against the other part. Undoing separation between your split wills will restore your will to the will of God.
If you can realize that therefore what you think of as the ego - this other alienated will that acts against you, your "enemy" - is in fact part of YOUR OWN WILL, acting against YOURSELF, that's the key to withdrawing all power from the idea of the "ego". It is not a separate thing that wills against you. It is YOU willing against YOU.
And that means, if you can realize you are literally doing this to yourself, that you can simply decide NOT TO will against yourself, and then, where is the separation? It's gone. This is why there IS NO EGO. There is only a conflicted will, and it's YOURS, and you can own it, and absolutely have all power to choose NOT to will against yourself. It's only you willing against yourself that is causing all your problems, not an "ego".