Context. The question arises from my former question on the remainder of a power series. Precisely, I was trying to understand if the boundary behavior of power series considered by Ricci in his paper [2] i.e. $$ \begin{cases} g(z)\text{ has a limit as $z\to e^{i\theta}$}\\ |g'(z)|< K\big|z -e^{i\theta}\big|^{\alpha-1} \end{cases} $$ where $\Bbb D=\{z\in\Bbb C: |z|<1\}$, $z\in \Bbb D \cap\big\{z\in\Bbb C: |z-e^{i\theta}|<\rho\big\}$, $0<\alpha\le 1$, $\rho>0$ and $K>0$ is more than a simplifying choice (I formerly called it "artificial"), and I found the following interesting lemma in the paper [1] (possibly the first one published by Stanisław Łojasiewicz, reproduced verbatim in the French original language).
Lemme II. Soit $g(z)$ une fonction holomorphe dans un domaine $G$ possédant une limite finie en un point frontiere $\zeta_0$ de $G$ et $\rho(z)$ la distance du point $z$ à la frontière de $G$. Alors $$\DeclareMathOperator{\D}{d\!} (z-\zeta_0)\cdot g^\prime(z) \to 0\text{ pour }z\to \zeta_0,\text{ de façon que $\frac{|\zeta_0-z|}{\rho(z)}$ reste borné}. $$ $\quad$Démonstration. Posons $A=\lim_{z\to\zeta_0} g(z)$, désignons par $C_z$ la circonférence $ |\zeta_0-z|= \dfrac{\rho(z)}{2}$ et soit $\eta(z) =\max_{C_z}|g(\zeta)-A|$. Pour chaque $z\in G$, on a $$ g^{\prime}(z)=\frac{1}{2 \pi i} \int\limits_{C_z} \frac{g(\zeta)}{(\zeta-z)^2} \D\zeta=\frac{1}{2 \pi i} \int\limits_{C_z}\frac{g(\zeta)-A}{(\zeta-z)^2} \D \zeta \text {, } $$ d'ou il vient $$ \left|g^{\prime}(z)\right| \leqslant \frac{1}{2 \pi} \pi \rho(z) \frac{\eta(z)}{\left(\frac{1}{2} \rho(z)\right)^2}=2 \frac{\eta(z)}{\rho(z)} $$ et par suite $\left|\left(z-\zeta_0\right) \cdot g^{\prime}(z)\right| \leqslant 2 \frac{\left|z-\zeta_0\right|}{\rho(z)} \eta(z)$, ce qui entraîne la thèse car $\lim_{z\to\zeta_0} \eta(z) = 0$.
This lemma seems to suggest that always $|g^\prime(z)| = \omicron|(z-\zeta_0)^{-1}|$ as $ z\to\zeta_0$. Unfortunately this seems not to be the case: by using a counterexample suggested by Alexandre Eremenko i.e. $$ g(z)=\frac{1-z}{1+z}\sin\left(\frac{1+z}{1-z}\right)\label{1}\tag{1} $$ we have that $g(x)\to 0$ as $x$ goes from $0$ to $1$ along the real axis but since $$ g^\prime(z) = -\dfrac{2\left[\left(z-1\right)\sin\left(\frac{z+1}{1-z}\right)+\left(z+1\right)\cos\left(\frac{z+1}{1-z}\right)\right]}{\left(z-1\right)\left(z+1\right)^2} $$ we have $$ |(x-1)g^\prime(x)|=O\left|\cos\left(\frac{x+1}{1-x}\right)\right|\nrightarrow 0\quad\text{ as $x\to 1$} $$
Question: what is the exact reason why Lemma II above is not applicable to \eqref{1}?
The only thing I see in the proof that makes me suspicious is the statement that always $\eta(z)\to 0$ as $z\to\zeta_0$. This seems not true for the above function as every circle $C_z$ intersects more and more paths along with $g(z)$ diverges as $z\to\zeta_0$, thus the maximum of $|g-A|$ is unbounded.
Bonus question: what are the additional requirements on $g(z)$ in order for the conclusion of the lemma to hold true?
The function
$$
g(z)=e^{-\left(\dfrac{1+z}{1-z}\right)^3}
$$
(again given by Alexandre Eremenko in this answer) seems to verify the conclusion of the above lemma and the main difference on the limiting behavior between it and \eqref{1} is that the latter does not have a Stolz approach region with greater than $0$ angular measure. Is this the missing requirement?
References
[1] Stanisław Łojasiewicz, "Une demonstration du théorème de Fatou" (French), Annales de la Société Polonaise de Mathématique/Rocznik Polskiego Towarzystwa Matematycznego, 22, 241-244 (1950), MR0038429, Zbl 0035.33901.
[2] Giovanni Ricci, "Sul resto delle serie di potenze alla periferia del cerchio di convergenza" (Italian) in Scritti Matematici in Onore di Filippo Sibirani, Bologna: Cesare Zuffi, pp. 233-242 (1957), MR0086864, Zbl 0077.28403.