As you rightly observed, the poof has much to do with the formalism of the Sweedler notation. I'll try to explain the usuage. Let's start with the identity
$$\Delta_2 := (\Delta \otimes id) \circ \Delta =(id \otimes \Delta) \circ \Delta$$
Depending on the position of the outer $\Delta$ one has respective structural identities:
$$\begin{array}{rll}
\Delta_2(h) = & \sum h^{(1)} \otimes h^{(2)} \otimes h^{(3)} & \text{(no particular position)} \newline
= & \sum (h^{(1)})^{(1)} \otimes (h^{(1)})^{(2)} \otimes h^{(2)} & \text{(1st position)}\newline
= & \sum h^{(1)} \otimes (h^{(2)})^{(1)} \otimes (h^{(2)})^{(2)} & \text{(2nd position)}
\end{array}$$
I call these "structural identities" since, for example, the same symbol $h^{(1)}$ can have different values in different equations. But it's exactly the philosophy of Sweedler's notation to limit the number of symbols.
Similarly, we have $$\Delta_3 := (id \otimes \Delta \otimes id) \circ \Delta_2= (\Delta \otimes \Delta) \circ \Delta $$ Again, there are structural identities $$\begin{array}{rl} \Delta_3(h) = & \sum h^{(1)} \otimes h^{(2)} \otimes h^{(3)} \otimes h^{(4)}& \newline = & \sum h^{(1)} \otimes (h^{(2)})^{(1)}\otimes (h^{(2)})^{(2)} \otimes h^{(3)} \newline = & \sum (h^{(1)})^{(1)} \otimes (h^{(1)})^{(2)} \otimes (h^{(2)})^{(1)} \otimes (h^{(2)})^{(2)} \newline \end{array}$$ Now let's have a look at the proof in question. Denote the multiplication by $\mu$. The third equality, for example, is obtained by $$\begin{array}{ll} & \sum (S((h^{(1)})^{(2)})\otimes S((h^{(1)})^{(1)})((h^{(2)})^{(1)}\otimes (h^{(2)})^{(2)}) \newline = & \big (\mu \circ ( (S \otimes S)^{op} \otimes id \otimes id)\big )\big (\sum (h^{(1)})^{(2)})\otimes (h^{(1)})^{(1)}) \otimes ((h^{(2)})^{(1)}\otimes (h^{(2)})^{(2)})\big) \newline = & \big (\mu \circ ( (S \otimes S)^{op} \otimes id \otimes id)\big ) (\sum h^{(1)} \otimes h^{(2)} \otimes h^{(3)} \otimes h^{(4)} ) \newline = & \sum \big(S(h^{(2)}) \otimes S(h^{(1)})\big)\big(h^{(3)} \otimes h^{(4)}\big) \end{array}$$$$\begin{array}{ll} & \sum (S((h^{(1)})^{(2)})\otimes S((h^{(1)})^{(1)})((h^{(2)})^{(1)}\otimes (h^{(2)})^{(2)}) \newline = & \big (\mu \circ ( (S \otimes S)^{op} \otimes id \otimes id)\big )\big (\sum (h^{(1)})^{(2)}\otimes (h^{(1)})^{(1)} \otimes (h^{(2)})^{(1)}\otimes (h^{(2)})^{(2)}\big) \newline = & \big (\mu \circ ( (S \otimes S)^{op} \otimes id \otimes id)\big ) (\sum h^{(1)} \otimes h^{(2)} \otimes h^{(3)} \otimes h^{(4)} ) \newline = & \sum \big(S(h^{(2)}) \otimes S(h^{(1)})\big)\big(h^{(3)} \otimes h^{(4)}\big) \end{array}$$ To obtain the the fith equation, let $$T(h^{(1)} \otimes h^{(2)} \otimes h^{(3)} \otimes h^{(4)}) = h^{(2)} \otimes h^{(3)} \otimes h^{(1)} \otimes h^{(4)}$$ Then: $$\begin{array}{ll} & \sum S(h^{(2)})h^{(3)}\otimes S(h^{(1)})h^{(4)} \newline = & \big( (\mu \circ (S \otimes id) \otimes \mu \circ (S \otimes id)) \circ T\big) \big( \sum h^{(1)} \otimes h^{(2)} \otimes h^{(3)} \otimes h^{(4)} \big) \end{array}$$ Now applying the 2nd structural identity for $\Delta_3$ above yields $$\sum S(h^{(2)})h^{(3)}\otimes S(h^{(1)})h^{(4)} = \sum S((h^{(2)})^{(1)})(h^{(2)})^{(2)}\otimes S(h^{(1)})h^{(3)} $$ Remark: Of course, one usually doesn't make a detour around expressing everything in the form $$\text{homomorphism}(\sum h^{(1)} \otimes h^{(2)} \otimes h^{(3)} \otimes h^{(4)})$$ but directly applies the homomorphisms element-wise. But I hope the principal becomes clearer that way.