Synchronous step-down DC-DC converter
Available on Tindie: https://www.tindie.com/products/nEXT_EVO1/universal-ac-mains-dimmer-mpdmv41/
With your linear regulator it has to dissipate three times the power that the ESP module is using. Yes it will get hot.
https://www.aliexpress.com/item/3pcs-1A ... 53201.html