As Conan The Barbarian would say, the Secret of Steel is that the hand wielding it is the most important thing. Any one of the many weapons mentioned is adequate for duty carry, if the officer is proficient in its use.
However, the best weapon available is one of the polymer-framed, high-capacity, .40 caliber compact guns, with a set of night sights: A state of the art TOOL. You can strap on a sexy hog-leg or custom .45, whatever, and it probably won't make a difference, but lots of guys have died trying to be cool in combat...
I've never been in a full-tilt firefight against an armed opponent shooting back, or multiple bad guys, but I think one of the modern high-capacity autos is a definite advantage. I'm not advocating "spray and pray", but instead establishing fire superiority as a tactic.
When I went through the academy in 2001, there were several agencies represented. Third-generation stainless S&W 4006s were standard with a couple of them, and it was a solid, reliable pistol. The large county S.O. had deputies choose from an approved list. None chose revolvers. Glock 22s were common, as were H&Ks. One cadet had a 9mm Sigma and was the object of much derision from the instructors, but he shot well enough.
My agency transitioned to the S&W M&P .40 a few years ago, and it would be my first choice. It has the best ergonomics of any handgun I've worked with, although I admittedly have no experience with SIGs, H&Ks, XDs or 4th gen Glocks. I carried M1911A1s and M9s in the Army, and have had a Glock 19 for 20+ years. I also own S&W Models 10 and 65.
The funny thing is, I really don't like the M&P's styling, and we're having rust issues with the supposedly stainless slide. The mags get rusty, too, and we're having to replace springs already.
I concur that .40 is the best compromise between power and capacity, although 9mm +P is probably just as effective. I find the recoil about the same (maybe a bit more muzzle snap with the .40, but negligible). I would carry .45 if only FMJ was allowed (or if high-capacity mags weren't available) but with modern HP ammo I don't think there is an advantage. .357 SIG is great but I think it's going the way of .41 Magnum.
I agree with the OP that the Glock 23 is a good choice, but again must say that the M&P .40 is superior (not having experience with Gen 4 Glocks). The polymer advantage is ease of carry and maintenance. I also don't like manual safeties. I think a magazine safety is a good feature in a duty gun.
Finally, the holster should be a type with level III retention. I like the Safariland 070 series, but most of my colleagues use the newer ALS.