You can easily edit my version to do that. Simply adjust the end durability you want to give the item based on player input using some conditionals. I feel like this makes it more complicated without much payoff, though you’re free to do as you wish with your time.
I would however instead suggest just using Tequila’s asm hack that optionally combines items when storing them.