Hi there, I know that Autofilter is to blame here but I wanted to post this here so that you were aware of the issue in case there could be anything done for your mod to harden against a crash like this in the future.
Also, this happens with upgrading power poles as well. Something might be fishy with the on_built_entity event Upgrade Planner raises... This should not be grabbed by Autofilter, since I am filtering the event for inserters.
Someone in the Factorio Discord pointed me to the fact that it is fishy by design. Event filters do not apply to mod-raised events, so there is no bug on your side :)