actually the phantom stranger is above everyone in both groups he has enough magical powers to be considered a near equal to the spectre and don't forget not even the spectre could killed him because he is an abstract being as he told the spectre in DOV not even you can killed me the universe will not allowed me to be killed
How can shazam be the most powerful if spectre was allowed to killed him but not allowed to kill the stranger. the phantom stranger at full potential is duex en mechina he was the first being powerful enough to defeat elipso and traped him in the black diamond don't forget even shazam could not defeat elpiso he called the spectre to take care of that problem