How can I get an enchanted item that cannot be used in a grindstone?

You just need to give yourself an enchanting book that looks like a real level 32k Quick Charge book by changing the lore and name, like so:

/give @s enchanted_book{display:{Name:'[{"text":"Enchanted Book","italic":"false","color":"yellow"}]',Lore:['[{"text":"Quick Charge enchantment.level.32767","italic":"false","color":"gray"}]']}} 1

You could code the game so that whenever somebody uses a grindstone, they lose however much XP as the Grindstone would give the user (Maybe by using the XP command on Grindstone used?).