Zigbee devices are already cloudless local devices, you don’t have to flash them unless there are alternative firmwares that add functionality you desire.
They also need a coordinator to comunicate with HA. You can get a zigbee stick, depending on how you plan on integrating these devices there are some chipsets you should look for. If you want the easy route go for ZHA and maybe the skyconnect stick, otherwise you can go with zigbee2mqtt route which supports more devices and is more customizable and look at their list of recommended coordinators.
Most mains powered zigbee devices act as router and extend the newtork, not all of them do and not all that do are good at it. Some manufacturers use custom implementations of zigbee like Aqara which can cause issues.
I use zigbee2mqtt with a sonoff P stick and I am happy with it, it’s not as plug&play as ZHA, but it’s easy to add support to new devices if they are not already supported.
The aqara endpoints I have are solid. But one aqara mains powered relay is causing delays with an aqara door sensor when connected to it. Aqara implemented some strange stuff in some of their zigbee devices