Looked further as to what had happened in the instance of pyanodons.
If the mod is unaware of pyalternativeenergy, then this is what happens.
If at data.lua
Lighted poles defines the entities, recipes, items for small, medium, large, and substation.
small ends up at lamp. medium and large ends up in distribution 1. substation ends up at distribution 2.
pyalternativeenergy completely redefines distribution 1 and 2, adds distribution 3 to 5.
As a result, although the recipe exists for medium, large, and substation, there is no tech to unlock them.
If at data-updates.lua
All 4 poles ends up at lamp.
If made pyalternativeenergy aware in info.json
data.lua
All 4 poles ends up at lamp
data-updates.lua
Just the small pole is unlocked by lamp
medium pole at distribution 1
large pole at distribution 2
substation at distribution 4.
So yeah. I think the best approach really, is define entities as early as possible, then in data-final-fixes, figure out at which techs to insert the recipes, falling back to the lamp technology if no other tech can be found.
Could also attempt to discover other poles during later data stages to define their lit counterparts. (knowing that no recycling recipes will exist for them due to them being found and defined later.)