The 9mm has the edge in "raw horsepower" but that is NOT the only factor here
. Especially not for defense against humans.
For personal defense use, you need a hollowpoint or functional equivelent, and it must expand.
Expansion is assisted by three things:
1) Size and shape of the hollowpoint cavity;
2) Speed of the round;
3) Construction & material of the bullet.
On a .38Spl round that the manufacturer knows is going to get used in a revolver of some sort, no compromise in bullet shape/materials need be made in order to reliably feed in a semi-auto!
A few attempts have been made to produce similarly "uncompromizing" 9mm ammo with giant hollowpoint cavities, such as the 115grain Cor-Bon - which is notorious for hanging up on the feed ramp of many slideguns.
Now take your typical .38+P 158grain lead hollowpoint moving at around 900fps from a 4" barrel. There's no way in hell those would feed and work in a 9mm, because of the shape, weight lack of jacket. Despite being primitive and slow, it will reliably expand at the velocities you get out of a 4" tube, and has a superb track record going back to the days of Elliot Ness
. I would rate this round as more real-world useful than at least 50% of the 9mm JHPs out there, despite being down on peak muzzle energy.
Another good choice in a 4" .38 tube is the Winchester Supreme 130grain JHP. The hollowpoint cavity is enormous, bigger than anything you'll see in the 9mm world. If you re-sized it down to .355 and fit it into 9mm shells, the feeding issues would be horrendous but in .38, who gives a dang about "feeding"?
I could go on and on but basically, in a revolver round there's a whole set of design constraints related to semi-auto feeding that simply don't exist in the revolver world, and often let the wheelgun rounds work well at lower peak energies.
The guy armed with a 4" .38 and good ammo is at no disadvantage.
With a 2" barrel, ammo selection for expansion at the lower speed is more critical, but there's still good choices available.