Example 7 Let the function $f(x)$ satisfy for any real number $x$: $f(2-x)=f(2+x), f(7-x)=f(7+x)$, and $f(0)=0$. Let $M$ be the number of roots of $f(x)=0$ in the interval $[-1000,1000]$. Find the minimum value of $M$.
Proof: From the given, the graph of the function $f(x)$ is symmetric about the lines $x=2$ and $x=7$, and $f(0)=0$,
so $f(4)=f(2+2)=f(2-2)=f(0)=0$.
$$
f(10)=f(7+3)=f(7-3)=f(4)=0 \text {, }
$$

Thus, $f(x)=0$ has at least two roots in the interval $(0,10]$. On the other hand, for any real number $x$, we have $f(x+10)=f(7+3+x)=f(7-3-x)=f(4-x)=f(2+2-x)=f(2-2+x)=f(x)$, so $f(x)$ is a periodic function with a period of 10. Therefore, $f(x)=0$ has at least $200 \times 2+1=401$ roots in the interval $[-1000,1000]$. Hence, the minimum value of $M$ is 401.