Gear matters far more.
IME: The in-built speakers of cellphones and laptops are pure sh!t (it's scary that people actually listen to music that way). Earplugs are usually crap. Cellphones are often crap (my Moto G is god-awful). Headphones can be anywhere from god-awful to very good. Computers are usually good. Desktop speakers are usually bad to decent. Real speakers are usually good.
As for lossy vs lossless, I (and probably everyone who's interested in this kind of thing) have played around with encoding software, and on my midrange/decent gear I can easily hear the difference between CD audio and 128 Kbit lossy, but it's really doubtful at 256Kbit lossy, and I hear no difference at 320Kbit lossy.
But, of course, if I load it up in my Moto G and listen to it through my earplugs, then everything sounds equally sh!tty.