A caveat about the following: I am not a logician,
so my experience has that limitation; also, my experience includes
a PhD in computer science, which may have "polluted" my pure-math knowledge.
That said, in my experience
a "pure" usage of the $\forall$ notation might look like this:
$$\forall x.\forall y.((x\in S \land y\in S)\implies (x\circ y\not\in S \land x=y)).$$
Note that I have gotten rid of all the commas, since I believe they
are relatively informal and (in this case) ambiguous.
Alternatively, maybe the original with the commas meant
$$\forall x.\forall y.((x\in S \land y\in S \land x\circ y\not\in S )
\implies (x=y)).$$
There's also a form in which we're allowed to indicate the domain as part of the $\forall$ notation itself (which I think the examples above show is not technically necessary):
$$\forall x:S.\forall y:S.((x\circ y\not\in S)\implies (x=y)).$$
At least, I think I've seen this with colons for the domain.
Alternatively, using set notation,
$$\forall x \in S.\forall y\in S.((x\circ y\not\in S)\implies (x=y)).$$
The dot after $\forall x\in S$ is (I think) a relatively common connector for such statements, but you might want to write it without any connector
(but with a little bit of blank space) in that position:
$$\forall x\;\forall y\;((x\in S \land y\in S)\implies (x\circ y\not\in S \land x=y))$$
or
$$\forall x \in S\;\forall y\in S\;((x\circ y\not\in S)\implies (x=y))$$
or maybe even with extra parentheses like this:
$$(\forall x \in S)(\forall y\in S)((x\circ y\not\in S)\implies (x=y)).$$
I think I've seen all of these at some point or another.
They all seem reasonably unambiguous to me.