Well, the MOST powerful handgun is likely a Maadi in caliber .50 BMG, or the insane revolver in .600 Nitro Express.
For a PRODUCTION handgun, you must consider the single shot pistols in rifle calibers as being VERY high on the list.
For a traditional handgun, the .500 S&W lays claim to the title, with 3,031 ft·lb muzzle energy. And FWIW, when Dirty Harry said "This is a .44 magnum, the most powerful handgun in the world", it was not.
.500 compared to a .44 magnum