I ran into this with yuoki engines, and the electric crusher (y_crusher2). The recipe produces an assembling machine and a secondary item, which results in your line:
item_name = recipe.results and #recipe.results==1 and recipe.results[1].name
failing to add productivity.
My suggestions is to add recipes which have a main product that is an item. A third condition, would be to take the main product, and if it is an item among the results, use it as the item_name. There are other ways to check if the main product is an item, but it would require longer checks.
One could also use the main_product more generally, as the current behavior is very selective in applying to only one-product recipes (which doesn't even check if the type is item, wasting work, and doesn't check if the result is among any item group vs only data.raw.item .)