Yes, the authors TUI program would also work just as well over RS232.
Because those are transports, the terminal [emulator] at the end, responsible for interpreting what the TUI program on the other end outputs (and vice-versa), are separate things. They live at different places in the OSI stack.