Do you have the latest boards file for the ESP?
Alexa broadcasts a UDP request on your local wifi network, scanning for compatible devices.
Reference
I just use ESPHome (on Home Assistant) or Tasmota on my ESP devices and Alexa Discovery never fails.
Hope this helps.