Rs485 communication between arduino

Your connection shows you are using hardware serial pins with Nano. Your code uses softwareserial on pins 3 and 4. That's not matching.

Also, use of esp32 default UART2 rx-pin for tx and default tx-pin for rx is confusing. Should work though..

From my experience those commonly available Max485 modules work reliably powered at 3.3V. No need to abuse your Esp32.