Consider $D = \Bbb C\setminus(\{e^{i\theta} : -\frac\pi2\le\theta\le\frac\pi2\}\cup(-\infty,0])$ and $f(z) = z(z^2+1)$. We know that $f$ can't be zero for any $z\in D$. If we consider now $A = \{n\in\Bbb N : n\ge2$ and there exists a branch of $\sqrt[n]{f}$ in $D \}$, what is $A$ exactly?
I tried the following: Take $\Gamma$ any closed curve (the only ones that interest us are the ones that go around $\{e^{i\theta} : -\frac\pi2\le\theta\le\frac\pi2\}$) \begin{equation} \frac1{2\pi i}\int_{\Gamma}\frac{f'(z)}{f(z)}\;dz = \frac1{2\pi i}\int_{\Gamma}\left(\frac1{z}+\frac1{z-i}+\frac1{z+i}\right)\;dz = n(\Gamma,0) + n(\Gamma,i) + n(\Gamma,-i) = 2n(\Gamma,i) \end{equation} With this, the only possibility is that $A\subset2\Bbb N$.
Rewrite $f(z) = \frac{z(z-i)}{(z+i)}(z+i)^2 = g(z)h(z)$, with $g(z) = \frac{z(z-i)}{(z+i)}$ and $h(z) = (z+i)^2$. By the same procedure as before, we know that $\frac1{2\pi i}\int_{\Gamma}\frac{g'(z)}{g(z)}\;dz = 0$, so there exists a branch for $\log(g)$, which means that there exists a branch for $\sqrt[n]g$ for any $n\ge2$. The branch for $\sqrt h$ is just $z+i$, so we know that there exists at least a branch of $\sqrt f$, so $\{2\}\subset A \subset 2\Bbb N$.
Can we say that $A$ is either $\{2\}$ of $2\Bbb N$?
If we instead consider $D' = \Bbb C\setminus(\{e^{i\theta} : -\frac\pi2\le\theta\le\frac\pi2\}\cup[-1,2])$, for that same $f$ we would get $\frac1{2\pi i}\int_{\Gamma}\frac{f'(z)}{f(z)}\;dz = 3n(\Gamma,0)$, and by the same reasoning as before, $\{3\}\subset A'\subset3\Bbb N$. Could the same result for $A$ be said for $A'$ (but with $3$'s instead of $2$'s now)?
(I'll use a capital “N” for the winding number in order to avoid confusion with the exponent $n$).
You correctly derived that $$ \frac1{2\pi i}\int_{\Gamma}\frac{f'(z)}{f(z)}\,dz = 2 N(\Gamma, i) $$ is an even number for all closed curves $\Gamma$ in $D$, and concluded that $f$ has a holomorphic square root in $D$.
Now note that $\Gamma$ can be chosen such that $N(\Gamma, i) = 2$. Then $f = g^n$ with a holomorphic function $g$ in $D$ implies $$ \frac 2n = \frac 1 n\frac1{2\pi i}\int_{\Gamma}\frac{f'(z)}{f(z)}\,dz = \frac 1{2\pi i}\int_{\Gamma}\frac{g'(z)}{g(z)}\,dz = N(g \circ \Gamma, 0) $$ and since the right-hand side is an integer it follows that $n=1$ or $n=2$.
So the answer to your question is that $A = \{ 2 \}$.
Generally one can show that $f$ has a holomorphic $n$-th root in a domain $D$ if and only if $\frac1{2\pi i}\int_{\Gamma}\frac{f'(z)}{f(z)}\,dz$ is a multiple of $n$ for all closed curves $\Gamma$ in $D$.