Building own hardware and firmware

WoW! That will be tons of work!

Far from i know, lots of SONOFF devices can be flashed with firmwares that ESPhome developed and released, and for the iHost, i have seen some topics posted in this forum that some developers/contributers have discussions and try outs, Reflash your iHost with your own Linux distribution,
HAOS on Sonoff iHost · darkxst/ha-operating-system Wiki · GitHub, but i don’t think there’s detailed guidelines for how to develop a firmware for iHost, but eWeLink CUBE make the API opened on the official website for developers to create add-ons for their own.