How did you choose a 220nF capacity? Is there a formula of some sorts? I just found today that Sunon fans are picky about PWM, I bought 3 fans, and 1 of them is not working with PWM power.
For sure there are formulas, look for e.g. RC circuit or for Low-pass filter in Wikipedia.
I just did some simulations in the free LTSpice program to get a rough idea about where I would be with the currents and voltages and it seemed to work fine for the 220nF capacitor I found in my junk box
Since I did not add a series resistor I wanted to keep the capacitor relatively small in order not to increase the peak currents too much (the wires have some resistance as well as the switching FET. The downside of this is a very high ripple in the resulting DC but seems to work fine for at least the Sunon I'm using. With larger capacitors you get a less ripply signal, but then you should also add a series resistor (a few ohms should be ok) to protect the switching FET.