Here is an example showing that even when $\phi\in C^\infty$, the Lebesgue measure of the set can be positive: $$ (*)\quad \mathcal{L}^n\left (\overline{\phi^{-1}(0)}\setminus\phi^{-1}(0)\right )>0 $$ and $\phi$ is a local diffeomorphism in a heinghorhood of $\phi^{-1}(0)$. Let $\Omega\subset\mathbb{R}^n$ be a nope set such that $\mathcal{L}^n(\partial\Omega)>0$. It is well known that such sets exist and in fact they can be homeomorphic to a ball. Let $E=\{x_i\}_{i=1}^\infty\subset\Omega$ be a countable set such that $\partial\Omega\subset\overline{E}$. Let $r_i>0$ be such that $$ \overline{B}(x_i,r_i)\subset\Omega \quad \text{and} \quad \overline{B}(x_i,r_i)\cap\overline{B}(x_j,r_j)=\emptyset. $$ Define $$ \phi:\bigcup_{i=1}^\infty\overline{B}(x_i,r_i)\to B(0,1) $$ as a similarity in each ball and extend it to $\Omega$ as a $C^\infty$ map. Then $E\subset\phi^{-1}(0)$ and hence $$ \partial\Omega\subset \overline{E}\setminus\Omega\subset\overline{\phi^{-1}(0)}\setminus\phi^{-1}(0). $$ proves ($*$). Clearly, $\phi$ is a local diffeomorphism in a neighborhood of $E\subset\phi^{-1}(0)$, but there might be points $x\in \phi^{-1}(0)\setminus E$ where the Jacobian $J_\phi=0$ equals zero. To avoid this problem we simply remove a small neighborhood of this set from $\Omega$.