Actually, got it to run by changing icon_size=64 to 32 in these two paragraphs. It probably breaks the game for vanilla, but gets it to run with BobAssembly
local refinery=table.deepcopy(data.raw["assembling-machine"]["chemical-plant"])
lib.proto.TintImages(refinery,{r=0.85,g=0.5,b=1,a=1})
refinery.name="spaceblock-matter-refinery"
refinery.crafting_categories={"spaceblock-matter-boiling"}
refinery.minable.result=refinery.name
refinery.next_upgrade=nil
refinery.result_inventory_size=1
refinery.source_inventory_size=1
refinery.icons={{icon=refinery.icon,tint={r=0.85,g=0.5,b=1,a=1},icon_size=32}}
refinery.icon=nil
refinery.localised_description={"entity-description.spaceblock-matter-refinery"}
refinery.crafting_speed=1.5
refinery.allowed_effects = {
"consumption",
"speed",
"productivity",
"pollution"
}
local refineryi=table.deepcopy(data.raw.item["chemical-plant"])
refineryi.name=refinery.name
refineryi.place_result=refinery.name
refineryi.icons={{icon=refineryi.icon,tint={r=0.85,g=0.5,b=1,a=1},mipmaps=4,icon_size=32}}
refineryi.icon=nil
refineryi.icon_mipmaps=nil
refineryi.subgroup="spaceblock-matter-boiling"
refineryi.order="a"
refineryi.localised_description={"entity-description.spaceblock-matter-refinery"}