You need to create a custom recipe type that overrides IRecipe#getRemainingItems to return a copy of the axe with its durability reduced.
I've got a very similar recipe implementation here, there's code in other parts of the repository to handle things like registration and data generation.
Your post was hidden because you dumped the log directly into it instead of posting it with a paste website as described in the FAQ. In addition to this, you posted in an old, potentially unrelated topic instead of creating a new one.