The cabins and experience on the 787 vs A340 were quite similar IME. Of course the 787 was newer, a bit quieter, and had better humidity/air pressure, but it was hardly a game changer. They do offer a different bubbly on the 787 over the other planes, and the IFE/power is a bit better. I'd stick to JFK/LAX if possible since they have the nice VS lounges. The UD on the 747 might be worth trying, but I personally prefer the seats which face the back of the center row since it provides a relatively private experience.