This is a few years old, so it may have already been mentioned here, but I just came across this article about the history of pies in the face in movies, and it's very good:
The writer/reviewer seems not to have actually watched many of the films that are referenced, and gets some facts wrong (relying on my memory mostly), For example, he cites Ben Turpin in 'Mr. Flip' (1909) but notes that some disagree that it was the first filmed pie-face gag ('the nature of the gag is debatable"). He does not elaborate on why. The Turpin clip is available in film archives. It is definitely a pie in the face (and qualifies as the 'first'). He then mentions Mabel and Fatty's 'lost' film ('A Noise from the Deep ', 1913; note: some stills from this film exist). But there is another Mabel film where she takes the pie in the face ('A Rag Time Band ') -- made the same year and released earlier -- that would take the precedent for the gag (at least for a woman being the recipient). Both were directed by Max Sennett (although Mabel would have a major role in producing many of these Silent Era films).
The Great Race: Apart form not even mentioning Natalie Wood (a highly respected actress at the time) and her submitting to a barrage of cream pies, her writes;
"Despite Edwards' best intentions, critics were split regarding the pie battle in The Great Race. Some loved the over-the-top nature of it, not to mention the sheer number of pies thrown (about 2,500, falling far short of the 4,000 in Battle of the Century), but others found fault in the timing and editing, causing the scene, despite its frenetic nature, to fall flat."
It seems like the writer is relying on what a critic or two said about the scene (it 'falls flat'), and NOT actually viewing it for himself. The scene has several very funny (even hilarious) gags and moments (mostly thanks to Jack Lemon's and Peter Falk's characters). Plus, the Great Race pie fight is in the Guinness Book of World Records as having used the most pies in a filmed pie fight (4100, I believe). The number used in Battle of the Century (Laurel and Hardy) is contentious. Fact check me on that.
I'll give 'The Medium' review 2 STARS.
Here is a much better and more thorough history of the pie-face gag (with stills from the 'Dr. Strangelove' pie fight scene that was cut from the final film edit):