ZigBee devices use less power, which means if they're battery powered, it can last longer than wifi devices. It has faster handshake too. it can wakes up from sleep and transmit data in less than a second, while a WiFi devices may need several seconds to connect to your AP if it has been sleeping for some time. The difference in latency is really noticable for stuff like door sensor or movement sensor where the device may be sleeping for extended amount of time. But if you build your own device using esphome, I guess there is no option but to use wifi.
As for security, if they're both offline, is it really matter?