Completely optically isolated Ethernet couplers requires a power source on each side, but it can be done; the most accessible one is a set of media converters with a very short optical patch cable. In this particular case to protect both the garage and generator side keeping the CAT6 cable underground you need one optical double conversion on each side and an independent, sacrificial power supply for the copper part converters. Doable, but too complicated.