My problem with home automation is not so much finding devices that are HomeKit compatible, but that they're all varyingly cranky.
IMO, IoT devices, including home automation ones, should have: ECC RAM and CPUs (and equivalent for their flash) providing greatly reduced susceptibility to random glitches, space to hold at least two copies of their firmware plus core firmware to redo a failed partial update, firmware signatures, a hardware "watchdog" timer to reset them if the OS didn't regularly check in perhaps by zeroing a counter (a basic sanity check), OS level software sanity checks on top of that (to include checks to determine if they need to re-register themselves with some controller or hub, rate-limited so that the total of such checks does not become burdensome), and the ability to hold the state of whatever they controlled across a reset or power outage. I may have forgotten something, but that seems a basic list sufficient to keep something working whenever possible. In the event of a detectable and persistent internal failure, they should report that and go to a "safe" state (usually turning off whatever they control), too.
Heck, even critical medical devices often lack some of those reliability features, which is plain appalling. But home automation could have potential safety issues, esp. given that remote control via the Internet is possible; and attacks that turn devices as trivial as lightbulbs into 'bots for further nefarious uses have been demonstrated, even if not widely deployed; and of course cameras are certainly targeted. The vast bulk of that would be preventable, with due care, and at least say five years of updates (IMO longer for things that don't need much new features and could last longer, like smart LED bulbs). It would certainly cost more for initial development (fixed costs), but at quantity only modestly more for hardware and maintenance (incremental costs).
(I certainly hope that self-driving cars have all those reliability features and probably more, like the ability to deal reasonably with both failures that don't directly impact drivability, and various sorts of failures that do.)