I think a simple fix for this would be to remove the tool from the recipie to create the machine and add a slot for it instead in the actual machine.
For example:
You make a quarry machine. The quarry machine requires a diamond pickaxe or diamond drilling bit to function. There's a slot for it when you right click.
You create a diamond pickaxe.
If you put a plain diamond pickaxe in the machine it will function as it does now, however if you wish you can enchant it then put it in.
As the quarry machine operates it will apply the enchanting options to it.
Enchants:
Efficiency - will reduce the amount of fuel being consumed by the engines powering the quarry without reducing speed.
Silk Touch - works as normal. Stone, Redstone/Coal/Iron/Copper/Tin/Uranium/Diamond Ore will be mined instead of their drops.
Unbreaking - (at the moment I don't see a need for this since the quarrys never need replacement bits. It would suck if they did, but this enchantment isn't needed for a quarry machine. Although instead of using a diamond pickaxe, if a new item were used (diamond drilling bit) and it could gradually wear out this enchantment could slow that process.)
Fortune - probably the one enchantment you will really want on your quarry machine. It will include the chance for gathering multiples when you mine ores such as coal, redstone, uranium (up to 2 per block), and diamond. (For the time being I don't see a need to make copper/tin/iron drop multiple.
That would be how I see enchantments working. I personally look forward to putting Efficiency and Fortune on my quarry machines Right now I'd like them to stop at the diamond layer so I can use my pickaxe on the stuff there.