The Enneagram personality types were derived in large part from Oscar Ichazo's ego-types which included fixations, holy ideas, traps, passions, and virtues. Ego in this sense can be thought of the sense of "I" or "self" that gets created or cultivated in our lives. While this sense of self can be useful in our lives, it can also create self-limitations and self-deceptions.
Ichazo's enneagrams hint at the mechanisms that keep us stuck in this ego sense of self and hint at the paths to remedy this. I say hint because the labels used with his enneagrams are often vague and sometimes unusable as they relate to the personality types that evolved from them. What's needed is an understanding of how to apply these enneagrams to the personality types without being misled by the labels yet also holding to the intent of those enneagrams.
I see two aspects of ego that relate to the personality types. The first one has to do with our self-concept and our restricted approaches to dealing with life (much of this operates outside our awareness). While the personality types can help us become aware of how this operates in our lives they can also reinforce this aspect of ego in people who identify too closely with "their" type (type is not "who" you are but is simply a part of who you are).
The second aspect of ego that more closely relates to Ichazo's enneagrams has to do with creating a sense of self that is separate from the world. The holy idea is the remedy or balancing response to egoic separation between self and the larger ground of being (the sense that we are part of something larger than ourselves). An example approach can be seen through the trap and holy idea of type 1.
The trap of type 1 is perfection while the holy idea of type 1 is holy perfection. The trap of perfection is the ego's ideal of how things should be. The ego forms a belief that the individual knows what is right and wrong and everyone should act accordingly. The trap comes from the individual believing that his or her determination of right is the absolute right. The individual is blind to the fact that his or her sense of right and wrong is coming from the ego and a personal experience that doesn't apply to everyone else or the world at large. Holy perfection points to the idea that the individual is not the determinant of what is right and wrong for the world and obligated to impose that upon others but there is something larger at work determining that and the challenge is to discover it in order to align with it or at least be respectful of it. In other words, the discernment is to become aware of the difference between what's right in terms of oneself vs. what's right in terms of everyone else. Both are useful. But one should not be mistaken for the other.