I was able to adapt the accepted answer to this MathOverflow post to positively answer the question. The point is that one can squeeze more out of Petrov's Baire category argument if one applies it to the "singular set" of the function, rather than to an interval.
The key step is to establish
Theorem 1. Let $f \in C^\infty({\bf R})$ be such that the quantity $M(x) := \sup_{m \geq 0} |f^{(m)}(x)|$ is finite for all $x$. Then $f$ is the restriction to ${\bf R}$ of an entire function (or equivalently, $f$ is real analytic with an infinite radius of convergence).
Proof. Suppose this is not the case. Let $X$ denote the set of real numbers $x$ for which there does not exist any entire function that agrees with $f$ on a neighbourhood of $x$ (this is the "entire-singular set" of $f$). Then $X$ is non-empty (by analytic continuation) and closed. Next, let $S_n$ denote the set of all $x$ such that $M(x) \leq n$ for all $m$. As $M$ is lower semicontinuous, the $S_n$ are closed, and by hypothesis one has $\bigcup_{n=1}^\infty S_n = {\bf R}$. Hence, by the Baire category theorem applied to the complete non-empty metric space $X$, one of the sets $S_n \cap X$ contains a non-empty set $(a,b) \cap X$ for some $a < b$.
Now let $(c,e)$ be a maximal interval in the open set $(a,b) \backslash X$, then (by analytic continuation) $f$ agrees with an entire function on $(c,e)$, and hence on $[c,e]$ by smoothness. On the other hand, at least one endpoint, say $c$, lies in $S_n$, thus
$$ |f^{(m)}(c)| \leq n$$
for all $m$. By Taylor expansion of the entire function, we then have
$$ |f^{(m)}(x)| \leq \sum_{j=0}^\infty \frac{|f^{(m+j)}(c)|}{j!} |x-c|^j$$
$$ \leq \sum_{j=0}^\infty \frac{n}{j!} (b-a)^j$$
$$ \leq n \exp(b-a)$$
for all $m$ and $x \in [c,e]$. Letting $(c,e)$ and $m$ vary, we conclude that the bound
$$ M(x) \leq n \exp(b-a)$$
holds for all $x \in (a,b) \backslash X$. Since $(a,b) \cap X$ is contained in $S_n$, these bounds also hold on $(a,b) \cap X$, hence they hold on all of $(a,b)$. Now from Taylor's theorem with remainder we see that $f$ agrees on $(a,b)$ with an entire function (the Taylor expansion of $f$ around any point in $(a,b)$), and so $(a,b) \cap X$ is empty, giving the required contradiction. $\Box$
The function $f$ in the OP question obeys the hypotheses of Theorem 1. By Taylor expansion applied to the entire function that $f$ agrees with, and performing the same calculation used to prove the above theorem, we obtain the bounds
$$ M(x) = \sup_{m \geq 0} |f^{(m)}(x)| \leq M(0) \exp(|x|)$$
for all $x \in {\bf R}$. We now have locally uniform bounds on all of the $f^{(m)}$ and the argument given by username (or the variant given in Pinelis's comment to that argument) applies to conclude.
Best Answer
The following version of the mean ergodic theorem is taken from the book of Krengel, "ergodic theorems".
Let T be a bounded linear operator in a Banach space X. The Birkhoff averages are denoted by $A_n = {1\over n} \ \Sigma_{k=0}^{n-1} \ T^k$. Assume that the sequence of operator norms $||A_n||$ is bounded independently of $n$. Then for any x and y in B, the following is equivalent :
-- y is a weak cluster point of the sequence $(A_nx)$,
-- y is the weak limit of the sequence $(A_nx)$,
-- y is the strong limit of the sequence $(A_nx)$.
(note that we talk about cluster points instead of converging subsequences because we didn't assume B separable. Hence the weak topology is not necessarily metrizable.)
This theorem implies e.g. the ergodic theorem for Markov operators on $C(K)$ (sequential compactness follows from Azrela-Ascoli), or the ergodic theorem for power bounded operators defined on reflexive Banach spaces (sequential compactness follows from Eberlein-Smulian).
There is a whole set of theorems in ergodic theory along these lines. Let me mention the convergence of the one sided ergodic Hilbert transform, discussed in Cohen and Cuny (see Th 3.2) as another example.