LH never bought the 777 because they were committed to the A340 series. Many view that as a mistake on their part. And while they have committed to the A350, the 787 and A350 are not as close to the same as were the A340 and the 777. There are a number of airlines flying both. So, while I do give the A350 an edge here I do not by any means think it is a lock, assuming it is for LH itself. If it is for one of the other lines I think the 787 would have the edge.
LH received its first A340s a few years before the 777 was ready because they needed the planes sooner (LH was the launch customer of the A342 and second customer, after AF, for the A343). But the LH Group has ordered 777s for both LH (GEC), 3S (on lease), and LX (for which a top-up order has been placed as well).
What may drive this to Boeing is the need to replace the OS 767s and 777s, which could be done with a plane as small as a B789, since no first class is needed. I also suspect that the balance would go to EW's BRU operations.
LHG held their noses and ordered the 748i.
LHG held their noses and ordered the 779.
LHG held their noses and ordered the 77W.
LHG can certainly hold their nose again and order the 787.
LH Group might be the only carrier who chose the 747-8I on merits...as they needed the J seat room. I suspect that the reason for the 77W order (for LX) might have been available slots since they needed the planes as leased A343s had to be returned to Airbus, but before the A350s were due. They're good belly cargo haulers though, and I suspect LX is making money there even if they can't fill the full Y cabin (LX being the second-highest premium carrier in LH Group after LH proper, which is why they're getting more). If LH knew now what it did then, would it have ordered 77Ws instead of 346s for LH proper, given that the 346s still have first class? (The A346 first flew in 2001; the B77W in 2003, and those likely replaced the 747-200Bs as D-AIHA arrived in 2003.)