Hm, interesting; I hadn't run into that crash myself, but I also wasn't using blueprints very often, was expecting the Things API (which handles the composite entity part of the runtime code for me) to be able to handle that more gracefully in 2.1
But no worries about the license; I don't plan on using the code (since your exact implementation is very different from mine; more hard-coded and less automated during the data stage, and I'm not comfortable borrowing anything from the control stage)
As for improving your own runtime implementation, I did notice that you use %10 to process every 10 ticks, which is fine for a small number of entities, but might cause problems if you were to add too many.
I doubt it will ever be a problem for you (like, how many heat inserters could one base use, compared to all the other calculations that would need to happen outside of your own control code), but I've heard that spreading checks across several ticks to be the idealized solution from most experienced modders. Unfortunately, I don't have a good implementation of this myself (I did something like spreading n number of entity checks across x number of ticks, but not in the most optimal way)
The best advice I got (which I am using to update my control code in the next heat inserters update) was to look at this on_tick code, provided by Thremtopod on the Foundry discord, and how they use next() to keep track of their placement in the storage table. You can try feeding that code to whichever AI assistant you are using, with some context about spreading entity checks across multiple ticks instead of checking them all in one tick