Ants are attracted to electrical equipment due to ferromagnetite crystals in their magnetoreception system being affected by the electromagnetic fields (EMF) in the equipment. It is thought that like birds, ants use the Earth's magnetic field to navigate. Much like moth are drawn to a light (since they navigate by the moon, which is normally stationary relative to their position over time), so also ants are drawn to electrical equipment. If you keep the moon always on your left, then you would go in a straight line at night. If you however think a streetlight is the moon, and keep it on your left, then you will go in circles, and likey spiral in towards it if you use normal mean adaptive path correction.
In Texas, ants have killed several times by infesting traffic signal control boxes!