A psychological, not just grammatical, term
In this framework, the ego's fleeting "sense of self" is treated as something a person does not fully control and which this teaching holds ultimately produces suffering. Rather than a single unified thing, the ego is described as a multiplicity of separate, often contradictory elements, each one also called "an ego" — a distinct psychological pattern.
This teaching represents these multiple egos symbolically in several ways: as three, echoing three centers of psychological function it calls the astral, mental, and causal bodies; as seven, echoing the seven capital sins of sloth, lust, pride, wrath, envy, greed, and gluttony; or as "legion," a multitude, as in the serpents of Medusa's head or the many heads of the Hydra.
Liberation as symbolic death
Within this teaching, reunion with the divine is understood to require the death of the ego — the element seen as causing separation from it. Read this way, stories of martyred saints, journeys into the underworld, and battles against dragons or monsters become symbols of this inner process rather than only external events, with the freeing of the soul from its "cage" read as the point of the story.