Instead of making a curing machine. Just cure them once, put them in the hall and complete a raid everytime you want to farm a Buy trade. This is just too expensive just for a 1 emerald buy on your 10 mending books. Even with the machine you are gonna waste gold and weakness potions every few days to reset the rapid decay to 25 discount. Stack Hero of the village with a cure (the decay slows down to a certain point) and you'll still get a 1-5 emerald trade every reset. Heck for a redstoner you should build a semi afk raid farm next to your trading hall and get some totems out of it. If you don't mind the ominous bottles.