I wish modding APIs in general did more sanity checking before loading a mod. A low hanging fruit is APIs to be statically typed, and also to not use nulls on such APIs and things like that. A more comprehensive check is to verify whether two mods are guaranteed to be compatible (but this sounds a bit hard).
But more importantly (not sure if that's the case with Factorio) not break the damn APIs all the time. Lots of games that are actively developed don't bother keeping stable APIs (a bit like like Gnome and its disregard for extension APIs), breaking mods at every new release. An egregious example is Europa Universalis IV and other Paradox games. This ensures that there is a tail end of mods (which is by far the majority) that just will never work anymore, and the mods being kept up to date become rarer and rarer.