I would do a transient analysis with a pulsed current source
and a trivial shunt (like 1E12 explicit resistor). I=CdV/dt, use
fixed (after initial condition=0) flat-top I, your C(V) is the
I/(dV/dt) at the voltage-point of interest; keep / plot V(t)
and I(t)/deriv(V(t)), change the X axis to be V(t) instead
of time, there's your C-V curve.
For accuracy you may want to crank down some of the transient
accuracy params, maybe pick a Euler solution method, and might
make sense to use a much larger than minimum device - like a
1000-element array - to stay up out of numerical noise / slop.