it's not directly a bug in the code, but a design flaw, caused by ignoring a limitation of powerpoles in vanilla :-(
the mining drill/chest with the error in that picture already has five wire connections and thus the chest/inserter can't be connected to it (is this "auto-connect" a feature of this mod at all, or is some other mod used that tries to automatically connect all machines, drills, and other energy using/producing entities with invisible poles?).
the factorio wiki says:
https://wiki.factorio.com/Electric_system#Network_priorities
A newly-placed electric pole will be automatically connected to nearby poles according to the following rules:
1. It will be connected to other available poles, starting with the closest one.
2. It won't be connected to 2 poles connected to each other (it won't form a 3 pole triangle).
3. It will not be connected to more than 5 other poles.
there are some other mods too which try to create automatic connections for the power network, and for all of them similar applies: many poles reach the maximum number of connections, additional connections are therefore refused, parts of the network are not connected properly, and when looking at the map with "show power connections" big areas are dense spiderwebs of blue lines.