I'm glad it works, but there's a cleaner way of doing it than appending the entire perk. This will add a new recipe unlock tag below the existing one, you just need to change the required perk level.
<insertAfter xpath="/progression/perks/perk[@name='perkElectrocutioner']/effect_group/passive_effect[@name='RecipeTagUnlocked'][@tags='meleeWpnBatonT2StunBaton']">
<passive_effect name="RecipeTagUnlocked" operation="base_set" level="1,5" value="1" tags="meleeWpnBatonT2StunBatonParts"/>
</insertAfter>
If you still want to append the perk for whatever reason, you should remove the existing perk using the remove xpath. Append adds code, it doesn't change it, so simply appending the perk will add a second copy of the perk and could cause issues.