I would suggest, as you only need 2mA, to forget about the capacitive dropper, and instead simply go for a resistive dropper instead. Use 2 10K 5W ceramic resistors in series, and a simple bridge rectifier and 12V 1W zener diode, along with a 470uF 25V capacitor, to give a roughly regulated 12V supply, that then uses a low current 5V regulator to give 5V. Cheap, long lasting, and probably the same volume overall, and will last decades in service. Yes has around 3W of power dissipation in use, not exactly the best, but will work over the full range of your nominal 230VAC mains, all the way from around 150VAC to around 270VAC with no problems.
Otherwise with a capacitive dropper you will need a series current limiting resistor, around 470R 5W, and a 275VAC VDR after the resistor, and between the capacitor and the common rail, to limit voltage spikes that will damage it, and the resistor will limit energy fed into the capacitor to increase life. Might do 2 years with a cheap X2 capacitor that is not a fake, and up to 10 years with a good brand non fake one.