Example 1 Solve the congruence equation $x^{3}+5 x^{2}+9 \equiv 0\left(\bmod 3^{4}\right)$.
Solve (1) the congruence equation
$$x^{3}+5 x^{2}+9 \equiv 0(\bmod 3)$$

It has two solutions: $\square$
$$x \equiv 0,1(\bmod 3)$$

Now $f(x)=x^{3}+5 x^{2}+9, f^{\prime}(x)=3 x^{2}+10 x, f^{\prime}(0)=0, f^{\prime}(1)=13$. Therefore,
$$3 \mid f^{\prime}(0), \quad 3 \nmid f^{\prime}(1) \text {. }$$

Next, solve the congruence equation
$$x^{3}+5 x^{2}+9 \equiv 0\left(\bmod 3^{2}\right)$$

First, find the solutions corresponding to $x \equiv 0(\bmod 3)$. Since $3 \mid f^{\prime}(0)$ and
$$f(0)=9 \equiv 0\left(\bmod 3^{2}\right)$$

Therefore,
$$x \equiv-3,0,3\left(\bmod 3^{2}\right)$$

are solutions. Next, find the solutions corresponding to $x \equiv 1(\bmod 3)$. Since $3 \nmid f^{\prime}(1)$, the corresponding congruence equation (21) is
$$13 y \equiv-5(\bmod 3),$$

whose solution is $y \equiv 1(\bmod 3)$, so we get the solution
$$x \equiv 4\left(\bmod 3^{2}\right) \text {. }$$

Next, solve the congruence equation
$$x^{3}+5 x^{2}+9 \equiv 0\left(\bmod 3^{3}\right)$$

First, find the solutions corresponding to $x \equiv-3,0,3\left(\bmod 3^{2}\right)$. Since
$$f(-3)=27, \quad f(0)=9, \quad f(3)=81$$

Therefore, by (III), the solutions corresponding to $x \equiv-3\left(\bmod 3^{2}\right)$ are
$$x \equiv-12,-3,6\left(\bmod 3^{3}\right)$$

The solutions corresponding to $x \equiv 3\left(\bmod 3^{2}\right)$ are
$$x \equiv-6,3,12\left(\bmod 3^{3}\right)$$

By (II), there are no solutions corresponding to $x \equiv 0\left(\bmod 3^{2}\right)$. Next, find the solutions corresponding to $x \equiv 4\left(\bmod 3^{2}\right)$. In this case, $f^{\prime}(4) \equiv f^{\prime}(1) \equiv 13 \equiv 1(\bmod 3), f(4)=153$, the corresponding congruence equation (21) is
$$\cdot y \equiv-17 \equiv 1(\bmod 3)$$

Therefore, we get the solution
$$x \equiv 13\left(\bmod 3^{3}\right)$$

Finally, solve the congruence equation
$$x^{3}+5 x^{2}+9 \equiv 0\left(\bmod 3^{4}\right)$$

At this time,
$$\begin{array}{lll}
f(-12)=-999, & f(-3)=27, & f(6)=405 \\
f(12)=2457, & f(3)=81, & f(-6)=-27
\end{array}$$

By (II), there are no solutions corresponding to $x \equiv-12,-3,-6,12\left(\bmod 3^{3}\right)$. By (III), the solutions corresponding to $x \equiv 6\left(\bmod 3^{3}\right)$ are
$$x \equiv-21,6,33\left(\bmod 3^{4}\right) ;$$

The solutions corresponding to $x \equiv 3\left(\bmod 3^{3}\right)$ are
$$x \equiv-24,3,30\left(\bmod 3^{4}\right)$$

Next, find the solutions corresponding to $x \equiv 13\left(\bmod 3^{3}\right)$. Since $f(13)=3051$, the corresponding congruence equation (7) is $y \equiv-113 \equiv 1(\bmod 3)$. Therefore, the corresponding solution is
$$x \equiv 40\left(\bmod 3^{4}\right)$$

The above three equations give all the solutions, the number of solutions is 7. Figure 1 shows the solution process.

Figure 1