This is my fully automated gold/bartering farm in modded survival. I am on 1.15, so I will add the piglin later on. The green building contains the sorting machine to sort bartering items and other stuff. It is encased in adventurine, a green quartz from one of my mods, which is very blast resistant to nether creeper explosions from that mod.
There are speedy hoppers from another mod which move products from the piglin to the sorting machine which is 2 chunks away to prevent angering the piglin. The sorting machine stores items in trunks from my mod, because they are more efficient and creeper proof compared to chests. If a piglin were angered if one is opened is why I have it that way. It also serves as overflow protection.
Gold ingots go directly to the piglins.
Rotten flesh goes to the sorting machine, where it is composted to bone meal.
Nuggets go to the sorting machine and are stored until forged into ingots.
Swords go to blast furnaces and are melted into scrap metal which will be melted into ingots and given to piglins.