How to simulate a continuous signal passing through a capacitor (simple coupling capacitor)
Is it necessary to take a derivative

Yes

or just get the first moment of the stochastic signal and eliminate

That's just a very crude approximation of taking the derivative. In some cases that's sufficient, but in most it's not.
For DC blocking the capacitor is typically used together with a resistor to form a high pass filter. The approximation is often &quot;good enough&quot; if the corner frequency of the high pass is well below any signal frequency of interest.