Merge existing components in smithing recipe?

hi, i was just wondering if it was possible to merge components in a smithing recipe, when both the input item and the recipe define that component. for example, let's say i put a sword as the base ingredient with minecraft:custom_data set to {test1:"test"}. if i were to set custom_data in the recipe, it would overwrite the previous custom_data regardless of whether the individual keys conflict, for example {test2:42} provided by the recipe would replace test1 instead of having both exist simultaneously. this also applies to attribute modifiers, which sucks because i'm looking to make a tinkerer's construct inspired datapack and i don't want to have to require players to physically throw items around in order to upgrade gear...
Continue to help post