Both are extremely powerful, they may not be gods, but they are at the entity level. The Ego is literally a living planet with the ability to control your entire body, mass, atmosphere, as well as manipulating electromagnetic energies, radiations. A kind of Celestial that consumes stars, planets to survive.
As for the Dormmamu, he is also extremely powerful, potentially immortal, who possesses enough power to threaten the race of the Celestials, as well as Eternity itself with its faltines flames.