There were advantages and disadvantages to the M4 series of tanks. There were advantages and disadvantages to the M26, as well!
To the M4's credit, it could go places the German tanks could never go. The chassis allowed greater mobility over a greater variety of terrain. This often allowed the M4s to be somewhere the Germans didn't expect them. By the M4A3E8, the 76mm gun became standard, and was effective against most of the German tanks it encountered. The gun on the M4A3E8 was stabilized to some degree (gyrostabilizers were coming into use at the time), so it could be fired more effectively on the move than the German counterparts. Also, the United States and Great Britain were experimenting with more effective ammunition, Armor Piercing Composite Rigid and Armor Piercing Discarding Sabot, that also gave some extra effectiveness to the M4s.
To ANdy's credit, the 17 lbr was an extremely effective gun. The Firefly with the 17 lbr was incredibly effective. The speed and mobility of the Fireflies was much greater than that of the Churchills and most other British tanks at the time. The British had the advantage of all of that fighting in the Sahara prior to the United States entering the war to learn some things. The early war British armor doctrine was much like ours for the majority of the war. We had to learn the same lessons, but we started a bit later.
As far as the Diesel vs. Gasoline argument, of course diesel is better, but we were suffering enough logistical problems in 1944 without adding another fuel to the mix. The mulberries were heavily damaged in storms and many of the European port cities were not able to accept supplies for quite a long time. By September, the Allies chose to supply the British Army under Montgomery in Operation Market Garden due to a lack of fuel, ammo, and other expendables. The Red Ball Express just couldn't keep up. Although the Pershing would have been very nice, it would have been difficult to keep it in the fight due to the increased logistical demand.
In addition, the M4 was never intended to be a tank-killer. It was an infantry support tank. The M10 Wolverine and M18 Hellcat were the tank killers. The M10 started life with the 76mm anti aircraft gun as its main gun. I don't recall the M18's gun off the top of my head and I'm too lazy to look it up. The Germans had difficulty imagining the speed of these tank destroyers advance. I've talked to M10 commanders who literally pulled to the end of a Luftwaffe runway and shot aircraft trying to take off to escape the Allied advance.
For all of the logistical and manufacturing wonders the United States managed during WW-II, there are lots of things we fail to remember sometimes. The USA had an almost 100% dependence on German optical glass for the M3 Lee/Grant series and this also impacted tank production. By 1943, we had lines producing domestic optical glass in quantity, but I don't think we ever reached the level of quality of the pre-war glass. That's just an example off the top of my head.
Also, remember, in the 1950s, we fought the Korean conflict with essentially the same equipment as we did WW-II. The M4A3s performed very well in Korea, as well. The M26 was not able to traverse a lot of the terrain that the M4 could manage, so although it was a better tank on paper, it could not always get to the fight. The M4 could get anywhere it needed to be, and actually performed well against the T34s the Inmun Gun (North Korean Peoples' Army) had.
In conclusion, the M4 performed quite admirably against most medium tanks (tanks in its same class). The German Mk IV was the comparable German tank. To compare the M4 to the Mk VI or Mk V German tanks is a dishonest comparison. If there is any fault to be found in this discussion, it's that the United States did not produce a heavy tank until the end of the war. The Tiger was a heavy tank. The Churchill was a heavy tank. The KV-85 the Russians had was a Heavy Tank.
The Sherman was a good, if not exemplary, medium tank.
Cheers,
kk7sm
Edited to fix my darned typos!