That is a capacitor dropper, and while they have purely CRAP power factor, the efficiency is actually not horrible, most of the voltage is dropped across the cap.
HOWEVER, they are non isolated, which limits the use case to things that have no accessible user connections apart for the power input, EVERYTHING on that board (and on any boards connected to it) must be assumed to be live at full mains voltage (Which makes plugging in the debugger a pain).
Anything you come up with that is better is likely to be more complex and less reliable.