It is well-known that a continuous map $f:M\to\mathbb{R}^n$ from a Hilbert manifold can be closely approximated by a smooth map $g:M\to\mathbb{R}^n$ which has no critical points.

But, can such a continuous map $f$ also be closely approximated by a map $h:M\to\mathbb{R}^n$ which has infinitely many critical points? Also, are these critical points dense in $M$?

A reference would be much appreciated. Thanks in advance! Cross-posted on MSE.

Edit: As mentioned by Pietro, a $C^0$ perturbation creates infinitely many local minima and maxima. However, do we rigorously show this?