Obviously timing is they key, but the argument of "you're swapping one dead card for another" is not true when the end of the game hits - it was dead (ish) but now it's the tie-breaker. The reason I said 'ish' was because the value of cards is also crucial with trashing+value-increase on the board. People have pointed these things out in the thread already, but it seems to me in a slightly dismissive way (though correct me if I've interpreted that wrong).
Anyway, both take G,G, Potion, one results in G,G,G,Potion, the other G,G,G,Farmland. I know which I'd rather have. (Or you could even go G,G,Farmland, Farmland, but only really late on). Yes if you buy a gold it can be backdoored, but then with the Farmland you have 2 new things that can be backdoored.
Farmland seems underrated round these parts sometimes. I think it's not just important at the end of the game though, it's important during too. If you never buy any Provinces and get your 4 from trashing Farmlands, you might be forgiven for thinking "I'm only 3 VPs up" (you trashed a copper for an estate on the first one say, to include max equivalent value). But is that right? Let's say you both get four Provinces + 3 VPs, the other guy from straight Provinces + 1 Duchy, you from 5 Farmlands (w/trashing). You've spent 30 treasure on your 27 VP, the other has spent 37. That's a free Expand/King's Court/Gold to your deck. That's assuming you trashed Farmlands only though, if you trashed Gold then the value proposition changes again (though it's more complex to asses and is not directly comparable).
Obviously these are somewhat idealistic conditions, and I would also caveat it by saying I don't think Farmland is a super ace, but I have seen it turn games quite a few times. Hitting 6 once you're going is way easier than hitting 8.
Back to the issue in hand - it would really depend on the situation/timing/shuffle-position of course, but I do think it it's a handy way to ditch the potion. Sure you can buy Gold, but then getting rid of crap can sometimes be better than adding quality, and that's what trashing is about.