I also found a rare bug, if you place the factory near the first electric pole, which is manually connected by wire to the Power switcher
Like this:
https://i.ibb.co/dg3w3hc/2022-11-06-081655.png
And try to destroy the factory, then:
Error while running event Factorissimo2::on_marked_for_deconstruction (ID 22)
Target entity is not electric pole: cannot connect copper wire.
stack traceback:
[C]: in function 'connect_neighbour'
Factorissimo2/control.lua:199: in function 'remove_direct_connection'
Factorissimo2/control.lua:699: in function 'cleanup_factory_exterior'
Factorissimo2/control.lua:920: in function <Factorissimo2/control.lua:912>