Most devices are connected to HomeKit through a Pi running Homebridge. I wanted voice control and Apple is the company I distrust the least since they at least pretend to care about privacy.
I have only messed around a little with HomeAssistant, but that's what I would recommend if you want entirely locally controlled home automation. They even have a voice assistant[1] but for now it's worse than Siri, which is really saying something.
1: https://github.com/SwiCago/HeatPump 2: https://www.thingiverse.com/thing:2392856 3: https://www.home-assistant.io/blog/2019/11/20/privacy-focuse...
One such example (Though I haven't used it personally): https://www.amazon.com/Amcrest-Splitter-Adapter-802-3af-comp...