I have put this answer together from the hint by @DanielFischer:
First consider $$I_1=\oint_{\gamma} \frac{z-\frac1{2i}e^{iz}}{z^3}\,dz$$ where $\gamma$ is a closed contour in the upper half plane, with $4$ pieces:
- $\gamma_+$ along the real line $z\in(\epsilon,R)$;
- $\gamma_R$ a semi-circular arc of radius $R$, $z=Re^{i\theta}$ for $\theta\in(0,\pi)$;
- $\gamma_-$ one along the negative real line, $z\in(-R,-\epsilon)$;
- $\gamma_\epsilon$ a semi-circular arc of radius epsilon, $z=\epsilon e^{i\theta}$ for $\theta\in(0,\pi)$.
The function in the integrand has a pole of order $3$ at $z=0$. The residue here is $$\begin{align}\mathop{\text{res}}_{z=0}(f(z))&=\frac1{2!}\frac{d^2}{dz^2}\left(z-\frac1{2i}e^{iz}\right)|_{z=0}\\&=\frac1{4i}\end{align}$$Then $$\int_{\gamma_\epsilon}\frac{z-\frac1{2i}e^{iz}}{z^3}\,dz=-i\pi\cdot\mathop{\text{res}}_{z=0}\left(\frac{z-\frac1{2i}e^{iz}}{z^3}\right)=-\frac\pi4$$
Here, the minus sign comes since $\gamma_\epsilon$ is clockwise. It can be shown that $\int_{\gamma_R} \frac{z-\frac1{2i}e^{iz}}{z^3}\,dz\to0$ as $R\to\infty$.
Next consider $$I_2=\oint_{\gamma} \frac{e^{-iz}}{2iz^3}\,dz$$ where this time, $\gamma$ is a closed contour in the lower half plane with $4$ pieces as above (but reflected in the $\Re$-axis). This also has a pole of order $3$ at $0$. It can be shown in a similar way to above that the residue here is $-\frac1{4i}$. Again, we get that along the radius-$\epsilon$ contour, this integral evaluates to $-\frac1{4i}$, since the residue changes sign, and the orientation of the contour changes to anticlockwise. Also, the integral along the radius-$R$ contour goes to $0$ too.
Putting this all together,
$$I_1+I_2=0\\\int_{-\infty}^\infty \frac{x-\frac1{2i}e^{ix}}{x^3}\,dx-\frac\pi4+\int_{-\infty}^\infty \frac{e^{-ix}}{2ix^3}\,dx-\frac\pi4=0\\\implies\int_{-\infty}^{\infty}\frac{x-\sin x}{x^3}\,dx=\frac\pi2$$which agrees with @JackD'Aurizio and @Dr.SonnhardGraubner 's results.