The merchant's rarity doesn't balance out its selling of rare items. It would also kind of ruin the progression that the game intends for you to go through, since emeralds are not that hard to obtain.
How are emeralds not hard to obtain? I can never find even one in my survival worlds.
The builder's AI can be taken advantage of by having it produce infinite building materials if it has any rules to it at all, and creating an automated farm to take what it produces. Also, if you build close to a village, and a builder villager decides it wants to build over what you've built, there's not really much you can do about it.
As I said in previous comments, the builders would use hitboxes of some sort to detect whether or not it is a player built object or an object that is part of the village.
Manipulating the builders to produce an infinite amount of materials would be more painstaking than, per say, making a sapling grove or using cobblestone gens.