What AC mains phase information can be deduced from measuring at two distinct devices, connected via ethernet?
If the devices share a time standard by some other method than Ethernet, then all they need to do is measure the phase relative to that time standard, and communicate the result by Ethernet.

There's a couple of ways the devices could share that time signal. Probably the simplest is to give each one a GPS receiver, though they may need pretty good antennae for indoor use. Another way would be to put a low-drift clock in each, and connect them together directly to synchronise them before you start. Alternatively, if you have ethernet cables running directly between the devices (no switches etc) you could transmit a time signal down the cable using a protocol with a lower overhead than TCP or UDP.