I found a solution for this issue. Just move the EEI one tile away from the center of the locomotive. Line 167:
local charger = game.surfaces[w.surface.index].create_entity{name = "deg-locomotive-charging-dummy", position = math2d.position.add(w.position, math2d.vector.from_orientation(w.orientation, 1)), force = w.force}
You can even use alert_icon_shift to have the "no electricity" icon in the center of the locomotive