Example 4 Solve the inequality $\log _{\frac{1}{2}} \frac{(x-1)^{2}+1}{1+2 a x}>0$.
Solve the original inequality, which can be equivalently transformed into
$$
\left\{\begin{array}{l}
\frac{(x-1)^{2}+1}{1+2 a x}>0 \\ 
\frac{(x-1)^{2}+1}{1+2 a x}>0
\end{array}\right.
$$
Since $(x-1)^2 + 1 > 0$, the system of inequalities (1) can be equivalently transformed into
$$
\left\{\begin{array}{l}
1 + 2 a x > 0 \\
\frac{x^{2} - 2 (a + 1) x + 1}{1 + 2 a x} > 0
\end{array}\right.
$$
When $a^2 + 2a > 0$, $a + 1 - \sqrt{a^{2} + 2 a} < x < a + 1 + \sqrt{a^{2} + 2 a}$.