Very true.
It seems the complaints against the M9 seem more than justified. The reason for going to the M9 was political not military. It had to do with stationing Pershing missles in Europe as I remember. Clearly a 9mm with a small capacity is not a good replacement for the .45acp M1911A1.
The complaints against the M4 seem less justified as it is a better urban warfare rifle the the M16 with its longer barrel. however, in longer range situations as one would expect it is not as effective as the M16. This seems like a matter of choosing teh equipment and tactics to fit the terrain.
But in our current warfighting, we are mostly talking about mounted troops dismounting from vehicles for short sharp engagements. In this case, .243 or 7.62 may do better.