But of course the market for it doesn't care, and can pay for it.
I've thought about it similarly to you, but because of the labour cost of installation, it's an expensive job whatever the cost of the hardware/software, so there's not really a reason for installers to use HomeAssistant, OpenHAB, and the like. The difference will be thousands for hardware, on top of tens of thousands for the whole install job.
I know a couple of wireless X-10 switches I used to own lasted for a very long time. I'm not sure I ever replaced the batteries.
I wouldn't choose it. Every ten pushes of the switch, nothing happens, and there's no visible / feelable state of the position of a switch.
The alternative is a self hosted server like haome assistant. That works but requires tinkering
It's cleaning, organizing, laundry, washing dishes, etc. that I'd really prefer not to do and--major appliances (and/or hiring someone) aside--there's no way to automate all that.