Another option is OpenLCB, which according to its proponents is "the future".
It is an event message based approach. What this means is that it is not necessary to poll a sensor. It will send a message when a change happens.
I'm trying to implement the basic protocols on arduino nanos with an ESP8266 wifi gateway to JMRI. It's not yet complete, but what I have so far seems to be working.
If I read your post correctly, you haven't built the transport layer yet. OpenLCB uses a CAN bus rather than RJ45. MCP2515 SPI-CAN adapters are available cheaply from China. I got mine from Tx-Hang's ebay store.
Regards
Otto