I'd have to go with the Wizard.
Shazam is like an ancient Dr. Strange, who not only channels the strengths of deities whose names have long been forgotten (and which make up his name VLAREM: Voldar, Lumian,Arel, Rivalbei, Elbiam and Malzosh; much like Egyptian deities make up the Shazam word of power for Black Adam, and more modern deities, all Greek apart from Samson, make up the Shazam word of power for Captain Marvel), but he also has all the ambient magical energy of the universe in his home (the Rock of Eternity).
And if Dr. Strange can make Dormammu cry uncle then the Wizard Shazam can likewise do the same.
Anyways, the Wizard is all-knowing and omniscient (due to the power of Historama), and has access to insane magic.
He'd just be another Dr.Strange to Dormammu.