Three. (20 points) Given that moving points $A$ and $B$ are on the ellipse $\frac{x^{2}}{8}+\frac{y^{2}}{4}=1$, and the perpendicular bisector of segment $AB$ always passes through point $P(-1,0)$. Find:
(1) The equation of the locus of the midpoint $M$ of segment $AB$;
(2) The maximum length of segment $AB$.

保留源文本的换行和格式，直接输出翻译结果。
(1) Let points $A\left(x_{1}, y_{1}\right), B\left(x_{2}, y_{2}\right)$, and the midpoint of line segment $A B$ be $M\left(x_{0}, y_{0}\right)$.

When $A B$ is perpendicular to the $x$-axis, the midpoint of line segment $A B$ is $M(-2,0)$.

When $A B$ is not perpendicular to the $x$-axis, since points $A$ and $B$ lie on the ellipse $\frac{x^{2}}{8}+\frac{y^{2}}{4}=1$, we have:
$\frac{x_{1}^{2}}{8}+\frac{y_{1}^{2}}{4}=1, \frac{x_{2}^{2}}{8}+\frac{y_{2}^{2}}{4}=1$.
Thus, $\frac{\left(x_{1}-x_{2}\right)\left(x_{1}+x_{2}\right)}{8}+\frac{\left(y_{1}-y_{2}\right)\left(y_{1}+y_{2}\right)}{4}=0$
$\Rightarrow \frac{y_{1}-y_{2}}{x_{1}-x_{2}}=-\frac{x_{0}}{2 y_{0}}$.
Since the perpendicular bisector of line segment $A B$ always passes through point $P(-1,0)$, we have:
$\frac{y_{1}-y_{2}}{x_{1}-x_{2}} \cdot \frac{y_{0}}{x_{0}+1}=-1 \Rightarrow x_{0}=-2$.
Therefore, the trajectory equation of the midpoint $M$ of line segment $A B$ is $x=-2(-\sqrt{2}<y<\sqrt{2})$.
(2) When $A B$ is perpendicular to the $x$-axis, $A B=2 \sqrt{2}$. When $A B$ is not perpendicular to the $x$-axis, from (1) we know $l_{A B}: y-y_{0}=\frac{1}{y_{0}}(x+2)$.
By solving $\left\{\begin{array}{l}y-y_{0}=\frac{1}{y_{0}}(x+2), \\ \frac{x^{2}}{8}+\frac{y^{2}}{4}=1,\end{array}\right.$ we get $\left(y_{0}^{2}+2\right) x^{2}+4\left(y_{0}^{2}+2\right) x+2 y_{0}^{4}+8=0$.
Then $x_{1}+x_{2}=-4, x_{1} x_{2}=\frac{2 y_{0}^{4}+8}{y_{0}^{2}+2}$.
Thus, $A B=\sqrt{\left(1+\frac{1}{y_{0}^{2}}\right)\left(16-4 \times \frac{2 y_{0}^{4}+8}{y_{0}^{2}+2}\right)}$ $=\sqrt{\frac{8\left(y_{0}^{2}+1\right)\left(2-y_{0}^{2}\right)}{y_{0}^{2}+2}}$ $=2 \sqrt{2} \times \sqrt{-\left[\left(y_{0}^{2}+2\right)+\frac{4}{y_{0}^{2}+2}\right]+5}$,

where $-\sqrt{2}<y_{0}<\sqrt{2}$, and $y_{0} \neq 0$.
Therefore, $A B<2 \sqrt{2}$.
Thus, the maximum length of line segment $A B$ is $2 \sqrt{2}$.