First of i really like how you generalized the code. Sadly it doesn't work with modded entities this way.
I can't say if that is the case for all modded entities but for my case with bob's it doesn't work until you have the optional dependencies. Guess your mod will loaded before the bob entities are loaded and such miss them.
For testing -> load bobs, creative + smokeless, stamp out some mk2 steam engines and look at the debug, you'll still see the red cycles for the smoke. After adding the optional dependencies for bob's they vanished on my save.
That all said, keep up the good work!