If you want to enchant an item with very high enchantments that are not supposed to be allowed, like sharpness 6, you'd need to use /give. For example, for a sword with sharpness 12 and knockback 5, you'd need to use: /give @p diamond_sword{Enchantments:[{id:sharpness,lvl:12},{id:knockback,lvl:5}]}.
/give @p diamond_sword{Enchantments:[{id:sharpness,lvl:12},{id:knockback,lvl:5}]}.
You can enchant just about everything, so if you want a stick that has a very high knockback, you can simply use: /give @p stick{Enchantments:[{id:knockback,lvl:30}]}
/give @p stick{Enchantments:[{id:knockback,lvl:30}]}
You can replace these enchantments with any enchantments, for example, you can use: /give @p diamond_sword{Enchantments:[{id:smite,lvl:65},{id:looting,lvl:10000},{id:fire_aspect,lvl:12}]}
/give @p diamond_sword{Enchantments:[{id:smite,lvl:65},{id:looting,lvl:10000},{id:fire_aspect,lvl:12}]}
/give @p stick{Enchantments:[{id:sharpness,lvl or:130}]}
/give @p stick{Enchantments:[{id:sharpness,lvl:130}]}
If you want to get an enchanted pickaxe, you can use: /give @p diamond_pickaxe{Enchantments:[{id:fortune,lvl:1000},{id:efficiency,lvl:10000}]}
/give @p diamond_pickaxe{Enchantments:[{id:fortune,lvl:1000},{id:efficiency,lvl:10000}]}
You can do this with any enchantments you want, and almost any object you want.