Hi,
Unfortunately, we do not have a similar example to your use case.
But according to your idea, it sounds like possible and you can try.
RutOS is OpenWrt based Linux OS, so you have full root access for configuration. And for programming, you can try to use these languages: Busybox shell, Lua, C, C++