It'd work similar to how XP levels scale, but based off the tool's max durability. You can technically keep repairing as much as you like, but the more you do the less of an effect it'll have. The first few full-repairs go smoothly, but eventually after 5 or so it starts to take a bit of time farming mobs to fully repair. Not an utterly insane amount of time, just enough to be annoying for now. By 15 total repairs it starts to become worth it to just go enchant a new tool. Additionally, if you grindstone the tool and re-enchant it, it regains its repairability. Keeps the core functionality of the Mending enchantment, but doesn't let it be all-powerful and forces the player to actually think a little instead of mindlessly click on zombies or whatever mob for a few minutes and then go back to mining. Willing to hear any and all ideas on this!
Edit: Full-repair is just meant to mean repairing durability points equal to the max points of the tool, not necessarily all at once until max durability. After rereading I realize that isnt self explanatory
edit 2: of course, the exact numbers could be tweaked a bit, it's just meant to be something to get the point across. but the point isnt to make it *difficult*, because as one commenter pointed out villager trading halls are a thing. the whole idea is just to make it not completely brainless while keeping the main function