Use a LM7805 in place of transistor and its zener.
Use 1W 12 V zener and 2W 50 ohm resistor.
The work principle is simple, capacitor in series has an impedance of 5.5kohm, so the max current is 35 mA.
12 V zener avoid high voltages on lm7805 (transistor here).
Use a 100 mA fuse for safety. Varistor would be nice too.
Ps: tested this circuit today (20/06/2019) on protoboard. It worked fine. powered a ATMEGA328 p with 1 led and a moving sensor.
Notice this circuit has a huge capacitive reactive power of about 10 VAr. It is nice for correction (not much) of your power factor if it is indutive.