Programming ESP8266 through Zero

so let start from the beginning. the Zero has native USB port configured as Serial and UART configured Serial1. I expect that you connected the esp8266 module to Serial1. so to flash the esp8266 you would need a SerialPassthrough sketch in Zero.

what do you want to flash into esp8266. you don't want to use AT firmware?

and if you still want to use and flash the esp8266 with Zero, you can use EspProxy