Power ESP8266 (~200/300mA) from main 230V AC with a very small power supply circuit
You want a premade offline SMPS module for this

The downside of a capacitive dropper or a buck converter is it isn't isolated from the mains supply, and a wall-wart is an extra box involved, which is also likely undesirable.  However, what if you could get the innards of a wall-wart in a form factor you can build into your own box?

Meet the Mean Well IRM-02-5:



This little black brick is a mini wall wart, capable of 400mA at 5V (2W power), with a full set of worldwide safety approvals (cRUus, TUV, CE), extra wide input range, PCB mount pins (there are other modules available with wire leads if that would be preferred), integral overload protection, and full Class II double-insulation so that you can safely do things like probe the low-voltage side of your board with your 'scope (just like a wall wart).