I have searched all over for such a library but it's not implemented yet.
I'm assuming you need to read data from the nodemcu device running micropython.
At the present there is only modbus libraries which will make the micropython device act as a master but not as a slave, this is one of your links to ESP32.
Master = will read a modbus slave/server device on the network
Slave = will be read by a master device on the network
So exactly the same functions to work as TCP and RTU slave will be required, the link below is for a master device only.
https://github.com/techbase123/micropython-modbus
I'd like to help with this library to be implemented and by no means I'm a programmer by I can modify software and tinker with it.
Also this library would make MicroPython's entry into industrial automation communicating via modbus which is used everywhere since it is a robust and reliable means of communication.