Appropriate parametrization involves $\;dz=\frac{d z(\phi)}{d \phi} d \phi = 3\pi i \exp(i \phi) d \phi$ which has been omitted in the original post. Numeric calculation yields a correct result, while the system can't integrate it symbolically with such a parametrization. Using Residue
we can find an exact symbolic result. In the comments there were some imprecise statements so we demonstrate the full reasoning.
There is a beautiful result in complex analysis: Residue theorem being a simple consequence of the Cauchy integral theorem, i.e. for e meromorphic function in a simply connected open subset $U$ of the complex plane we have
$$\int_{\gamma} f(z)dz=2 \pi i \sum_{a \in A} Res_{z=a}(f(z))$$
where $A$ denotes the set of residual points in a region enclosed by $\gamma$.
For the problem at hand: $f(z)=\frac{z^2}{(\exp(z)-1)^2}$ and $\gamma=\{x \in U: |x|=3\pi \}$
Let's find all residual points:
A = z/.{ToRules @ Reduce[(Exp[z] - 1)^2 == 0 && Abs[z] <= 3 π , z]} // Flatten
{0, -2 I π , 2 I π }
and finally the contour integral is
Total[2π I Residue[z^2/(Exp[z] - 1)^2, {z, #}] & /@ A] // Simplify
16 I π^3
With another approach which uses symbolic calculation, Mathematica 11.2 takes a bit (~10 sec.) to yield a silightly involved expression:
int = Integrate[ z^2/(Exp[z] - 1)^2, {z, 3π , 3I π , -3π , -3I π , 3π }];
which can be approximated (simplified) (as observed by Bob Hanlon) with
RootApproximant[int/π^3] π^3
16 I π^3
Here we demonstrate different contours of integration we've discussed
ContourPlot[{Re[(Exp[z] - 1)^2] == 0, Im[(Exp[z] - 1)^2] == 0,
Abs[z] - 3 Pi == 0} /. z -> x + I y // Evaluate,
{x, -3.5 π, 3.5 π}, {y, -3.5 π, 3.5 π},
Epilog -> {Red, PointSize[0.02], Point[ReIm[A]], Dashed, Thick,
Purple, Line[{{3π, 0}, {0, 3π}, {-3π, 0}, {0, -3π}, {3π, 0}}]},
PlotLegends -> Placed["Expressions", Right],
ContourStyle -> {{Thick, Darker@Green}, {Thick, Cyan}, {Dashed, Thick, Orange}}]
For various examples of appropriate parametrizations, see e.g.
Paths integrals in the complex plane
How do I find line integrals?
How to calculate contour integrals with Mathematica?
There were many different helpful posts on this site, however such an amazing subject as complex analysis deserves repetitions, since repetitio est mater studiorum.
dz = 3 Pi I Exp[I th] dth
$\endgroup$* 3 Pi I z
still doesn't give the correct answer $\endgroup$3 Pi
there. problem solved! $\endgroup$