Probably the best would be the ESP12E or F. They have 4MB of flash, a lot of software goes in and they are easily accessible. It is so small that there is no room for goldpins.
I would avoid the ESP01 modules as they have 512kB and very little Gpio output and are similarly priced to the above. Supposedly 512kB should be enough to control relays, but it varies, new functions and ideas come along. The system itself takes up most of this flash.
However, these are bare modules, requiring power and an external programmer.
Also consider how much Gpio you need and evaluate the modules from that side.
If you are looking for a small devboard then I recommend the Wemos D1 mini. It has power and programming via microUSB and is not much bigger than the bare modules.