If you need to protect your device againts electrical Surges over ethernet-Ports,
you will need to buy some Ethernet Surge Protectors (It`s recommended to use a surge protector on both ends)
Many solutions out there..
Mikrotik offers some Solutions :
https://mikrotik.com/product/rbgesp
https://mikrotik.com/product/gesp_poe_in
Food for thought :
Sometimes, depending on the Setup,
it easiert to use Fiber-Optic to provide a galvanic isolation to protect critical devices.