I've the W4 (same setup as the W40) and it does fine with 256 AAC (default iTunes). 256 AAC is actually pretty good quality, I wouldn't dip below it though.
Actually, a lot of people can't tell the difference between 320 MP3 and lossless... As you go up, less information is taken out. Generally, in the highs, they try to take out supersonic frequencies.
Personally, I won't dip below 256 otherwise I'll hear the difference (using a pair of earpods :p)
The W4 and W40 sound noticeable different. The W40 has a deeper bass, more powerful but detailed, I don´t like when the sound has a lot of bass but with the W40 I'm really enjoying it. Also the mids are different, clearer. The first thing you can notice between when you change from the W40 to the W4 is that the "S" sounds (I don't know what's the name in English -sorry) is almost annoying, I remember that with the Westone UM2 I had the same feeling.
And regarding the Lossless formats (this is completely personal and based on my own experience): they are great for archiving purposes, but for listening they don't make any sense. I did several ABX test with the W4, Alessandro MS2 and the Asus Xonar STX soundcard with FLAC and MP3 at 128 and 192 encoded by myself. The result was that for the 128kbps I could guess the FLAC in the 90% of the times (roughly, depends on the album, song, style...etc). With 192kbps the test was very confusing as I only could differentiate one song!
So now I only encode my music at 256kbps and use Google Play Music (paid).
I am not saying that there are people able to differentiate a 320kbps from a FLAC, but maybe less than 1%...and those who "think" they can do it, they should try an ABX test first :).
More details here: http://reproductormp3.net/index.php?topic=12661.0 (in Spanish)