No, and it's not close. You sell a 5 heart pig that finds you lots of truffles, only to buy a zero heart baby pig 18 days later, that will find fewer truffles in Spring. Per pig, you've made a net profit of 4,800g from the sale, and saved another 900g in hay, which is 5,700g to the good. But when an iridium truffle sells for 1,250g, your old pig would only need to find 5 more truffles than its potential replacement. And as the number of truffles a pig can find each day is closely linked to its friendship with you, its earnings will easily outstrip the 5,700g you "saved".