Your proof is flawed, but not very much.
You say, "And since S is an inverse semigroup, S is regular and hence each $\mathscr{L}$-class contains a unique idempotent."
No, it's not true that in a regular semigroup each $\mathscr{L}$-class contains a unique idempotent. The theorem is this:
Theorem 1. A semigroup $S$ is regular if and only if each $\mathscr L$- and $\mathscr R$-class contains an idempotent.
There's nothing about uniqueness here, and indeed those idempotents may not be unique. (Try finding an example!) However, there is another theorem:
Theorem 2. A semigroup $S$ is inverse if and only if each $\mathscr L$- and $\mathscr R$-class contains a unique idempotent.
So the uniqueness you're using follows from inverseness of $S$, not from regularity.
Now, you're asking why $x^{-1}x$ is an idempotent in $L_x$. But this is an easy exercise. We have $(x^{-1}x)^2=(x^{-1}x)(x^{-1}x)=(x^{-1}xx^{-1})x=x^{-1}x.$
This only uses the definition of the inverse. Now why is it in $L_x$? It is enough to show that there exist $a,b\in S^1$ such that $x=ax^{-1}x$ and $x^{-1}x=bx.$ Take $a=x$ and $b=x^{-1}.$
Now the other direction. Since $x^{-1}x$ and $y^{-1}y$ are equal and in the same $\mathscr L$-class as $x$ and $y,$ we have $S^1x=S^1x^{-1}x=S^1y^{-1}y=S^1y$ and so $x\mathscr L y.$
EDIT
I will give the proofs of theorems 1 and 2 here. First we will note the following fact.
Fact. Let $S$ be a regular semigroup and $x\in S.$ Then $S^1x=Sx$ and $xS^1=xS.$
I will leave the simple proof to you. This fact has the following corollary.
Corollary. Let $S$ be a regular semigroup and $x,y\in S.$ Then $(1)\;\;x\mathscr L y \iff Sx=Sy$ and $(2)\;\;\;\;x\mathscr R y \iff xS=yS.$
Proof of theorem 1. Suppose $S$ is a regular semigroup. Let $x\in S.$ Then there is $y$ such that $xyx=x$ and we have $(yx)^2=yx.$ We note that $x=x(yx)$ implies $Sx\subseteq S(yx)$ and $(yx)=y(x)$ implies $S(xy)\subseteq Sx.$ Therefore $Sx=S(yx)$ and $x\mathscr L (yx).$ Hence $L_x$ contains an idempotent, namely $yx$. We prove that the idempotent $xy$ is contained in $R_x$ similarly.
Conversely, suppose each $\mathscr L$- and $\mathscr R$-class contains an idempotent. Let $x\in S.$ We have idempotents $e^2=e\in L_x$ and $f^2=f\in R_x.$ There exist $a,b,c,d\in S^1$ such that $x=ae,\;\;\;e=bx,\;\;\;x=fc,\;\;\;f=xd.$ (Notice that we can't write $a,b,c,d\in S.$ We don't know $S$ is regular yet.)
Now we have $x=ae=aee=xe=xbx=fcbx=ffcbx=fxbx=x(dxb)x,$ where $b,d\in S^1.$ If $b,d\in S,$ then $dxb\in S$ and we are done. If $b\not\in S,$ then $b=1.$ Then if $d\in S,$ we have $dxb=dx\in S$ and we are done. But if also $d=1,$ then $dxb=x\in S$ and we are done. Similarly, nothing bad happens if $d=1.$ $\square$
Remark 1. Note that we could have been satisfied with $x=xbx.$ Indeed, then if $b\in S,$ the proof is done. If $b=1,$ then $x=xx=xxx$ and we are also done. I posted the previous calculation because the formula we obtain doesn't prefer either of the elements $b$ and $d.$
Remark 2. Note also that we have $(bxd)x(bxd)=b(x(dxb)x)d=bxd.$
Proof of theorem 2. Suppose $S$ is an inverse semigroup. It is therefore a regular semigroup and from theorem 1, we know that for every $x\in S$ we have idempotents $e^2=e\in L_x$ and $g^2=g\in R_x.$ We need to prove that they're unique.
Suppose $f^2=f\in S$ and $e\mathscr L f.$ Then there exist $a,b\in S$ such that $ae=f,\;\;\;bf=e.$ But then $efe=bffe=bfe=ee=e$ and analogously $fef=f.$ Therefore $f$ is an inverse of $e.$ But also $e$ is an inverse of $e$ because $eee=e.$ Since in an inverse semigroup we have unique inverses, this gives us that $e=f.$ Analogously, we prove that idempotents in $\mathscr R$-classes are unique.
Conversely, suppose there are unique idempotents in $\mathscr L$- and $\mathscr R$-classes of $S.$ From theorem 1, we know that this implies the regularity of $S.$ This ensures the existence of inverses. We need to prove their uniqueness. Let $x\in S$ and let $x_1,x_2\in S$ be inverses of $x.$ It should be clear by now that it implies $(x_1x)\mathscr L (x_2x),\;\;\;(xx_1)\mathscr R (xx_2).$ But those elements are idempotents so we must have $x_1x=x_2x,\;\;\;xx_1=xx_2.$ Therefore $x_1=x_1xx_1=x_2xx_1=x_2xx_2=x_2.$ We proved that inverses are unique in $S,$ which ends the proof of the theorem. $\square$