True, but seats on the 777 are just as wide or wider. And a 2-3-2 arrangement in business is hardly considered so horrible that passengers "suffer" a middle seat. Yes, the 2-5-2 arrangement on the 777 is not good; the alternate 3-3-3 arrangement is better.
The 777 has superior overhead storage and headroom though. I suppose you're referring to that ridiculous diagram on the Airbus website, which suggests that airlines fly with the overhead bins open (that's the only time when the A340 would have more headroom). Which would you rather have: less headroom for most of the flight on the A340, or 5 minutes of less headroom on the 777 when someone opens the bins? The 777's innovative drop-down bins are large, deep, and easier to reach when opened, and they neatly retract back up. The A340's bins are a typical old design that you find on any other plane. And danger of luggage falling on passengers? Do you have proof that that is a problem? Doesn't seem like a problem.
And very rarely do airlines remove the middle bins.
In the industry, it is widely recognized that the 777's interior design is the best of any airliner flying today. It's sleek and very modern with curved walls and ceilings.
See the difference yourself:
Singapore Airlines 777: http://www.airliners.net/open.file/233996/L/
SAS A340: http://www.airliners.net/open.file/191769/L/