Obtaining an expansion up to $o(x^4)$ requires in fact a much longer expansion.
As you have noticed with WA, we have an $\dfrac 1{x^2}$ leading coefficient this means that in fact we have to account for $x^{-2},x^{-1},x^0,\cdots,x^4$ these are $7$ terms.
Thus we need to expand the denominator up to $o(x^7)$ and the numerator up to $o(x^6)$, which divided by $x^2$ give a max order of $x^4$.
- Let's start expanding the numerator:
$e^x = 1+x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+\frac{x^5}{120}+\frac{x^6}{720}+o(x^6)$
- And then the denominator :
Reminder : $(1+u)^{-2}=1-2u+3u^2-4u^3+5u^4-6u^5+7u^6+o(u^6)$
$\begin{align}(e^x-1)^{-2}&=\left(x+\frac{x^2}{2}+\frac{x^3}{6}+\frac{x^4}{24}+\frac{x^5}{120}+\frac{x^6}{720}+\frac{x^7}{5040}+o(x^7)\right)^{-2}
\\&=x^{-2}\left(1+\frac{x}{2}+\frac{x^2}{6}+\frac{x^3}{24}+\frac{x^4}{120}+\frac{x^5}{720}+\frac{x^6}{5040}+o(x^6)\right)^{-2}
\end{align}$
The tedious part start here, calulcating all these power of $u$. Just apply the binomial formula and ignore terms in $o(x^6)$.
$u=\frac{x}{2}+\frac{x^2}{6}+\frac{x^3}{24}+\frac{x^4}{120}+\frac{x^5}{720}+\frac{x^6}{5040}+o(x^6)$
$u^2=\frac{x^2}{4}+\frac{x^3}{6}+\frac{5x^4}{72}+\frac{x^5}{45}+\frac{17x^6}{2880}+o(x^6)$
$u^3=\frac{x^3}{8}+\frac{x^4}{8}+\frac{7x^5}{96}+\frac{137x^6}{4320}+o(x^6)$
$u^4=\frac{x^4}{16}+\frac{x^5}{12}+\frac{x^6}{16}+o(x^6)$
$u^5=\frac{x^5}{32}+\frac{5x^6}{96}+o(x^6)$
$u^6=\frac{x^6}{64}+o(x^6)$
Now you sum them all: $(1+u)^{-2}=1-x+\frac {5x^2}{12}-\frac {x^3}{12}+\frac {x^4}{240}+\frac {x^5}{720}-\frac {x^6}{6048}+o(x^6)$
And that gives you: $(e^x-1)^{-2}=\frac{1}{x^2}-\frac{1}{x}+\frac {5}{12}-\frac {x}{12}+\frac {x^2}{240}+\frac {x^3}{720}-\frac {x^4}{6048}+o(x^4)$
- Finally you multiply numerator expansion with denominator expansion, ignoring all terms in $o(x^4)$.
$\dfrac{e^x}{(e^x-1)^2}=\frac{1}{x^2}-\frac {1}{12}+\frac {x^2}{240}-\frac {x^4}{6048}+o(x^4)$
Note:
I have detailed the process but not all the calculation. In practice we rarely do such deep expansion manually. It is feasible up to order $4$ or so, but after that, it becomes generally very tedious.
Beyond that, you generally go for theoretical expansion, as shown in the links in comments. Still this is only for $(e^x-1)^{-1}$, it may not be that easy for the square of that, except that in this particular example, it is a proper derivative as shown in Jack D'Aurizio's answer.