Let $\;\;\displaystyle f(z;x) = z - \frac{(z+1)^3 x}{z}\;\;$, the integral $\mathscr{I}$ we want to calculate is
$$\mathscr{I} = \frac{1}{2\pi i}\int_{(0+)}\frac{dz}{f(z;x)} = \frac{1}{2\pi i}\int_{(0+)}\frac{z\,dz}{z^2-(z+1)^3 x}$$
where $(0+)$ stands for a circular contour surrounding $0$ in ccw direction.
If one pick a small but non-zero real $x$ and make a plot of the denominator $z^2 - (z+1)^3 x$, one will notice it has two roots $\lambda_1, \lambda_2$ near $z = 0$ and a root $\lambda_3$ with $|\lambda_3| > 1 > |\lambda_1|, |\lambda_2|$. Instead of summing the residues
from $\lambda_1, \lambda_2$, it will be simpler if one compute the contribution from $\lambda_3$.
To do this, we deform the contour to a ccw circle at $\infty$. In the process, we will leave a small cw circlular loop around $\lambda_3$. i.e.
$$\mathscr{I}
= \frac{1}{2\pi i}\left( \int_{(\infty+)} + \int_{(\lambda_3-)}\right) \frac{dz}{f(z;x)}
$$
Since $|f(z; x)| \sim O(|z|^2)$ for large $z$, the integral around $\infty$ vanishes and
$$\mathscr{I} =
\frac{1}{2\pi i}\int_{(\lambda_3-)}\frac{dz}{f(z;x)}
= -\text{Res}\left(\frac{1}{f(z;x)}; \lambda_3\right)
= -\frac{1}{f'(\lambda_3;x)}
$$
Notice
$$\begin{align}
& f'(z;x) = 1 - \frac{(z+1)^3 x}{z} \left(\frac{3}{z+1}-\frac{1}{z}\right)\\
\implies
& f'(\lambda_3;x ) = 1 - \lambda_3\left(\frac{3}{\lambda_3+1}-\frac{1}{\lambda_3}
\right) = \frac{2 - \lambda_3}{\lambda_3+1}
\end{align}$$
We get
$$\mathscr{I} = \frac{\lambda_3 + 1}{\lambda_3 - 2}\quad\iff\quad\lambda_3 = \frac{2 \mathscr{I} + 1}{\mathscr{I} - 1}$$
Substitute this back into $f(\lambda_3;x) = 0$, we obtain following constraint of $\mathscr{I}$:
$$
f(\frac{2 \mathscr{I} + 1}{\mathscr{I} - 1}; x ) = \frac{(4 - 27x)\mathscr{I}^3 - 3\mathscr{I} - 1}{(\mathscr{I}-1)^2(2\mathscr{I}+1)} = 0
$$
Let $\alpha = \sqrt{1 - \frac{27}{4}x}$, this reduce to
$$4\alpha^2\mathscr{I}^3 - 3\mathscr{I} - 1 = 0
\quad\iff\quad
T_3(\alpha\mathscr{I}) = 4 (\alpha\mathscr{I})^3 - 3 \alpha\mathscr{I} = \alpha
$$
where $T_3(t)$ is the Chebyshev polynomial of first kind with degree 3:
$$T_3(t) = 4 t^3 - 3 t = \cos(3\cos^{-1}(t)) = \cosh(3\cosh^{-1}(t))$$
Since $\mathscr{I}$ is the root of $T_3(\alpha\mathscr{I}) = \alpha$ which $\to 1$ as $x \to 0$, we can conclude
$$
\mathscr{I}
= \frac{1}{\alpha}\cos\left(\frac13\cos^{-1}\alpha\right)
= \frac{1}{\sqrt{1 - \frac{27}{4}x}}\cos\left(\frac13\cos^{-1}\sqrt{1 - \frac{27}{4}x}\right)
$$