There is some polemic about the gene idea (1), but it seems to me that the discussion is more about semantics, and, that from an information point of view, it's the gene the minimum unit that is "learning" about the environment.
The shape and behaviour of a molecule is depending of the constituent atoms. I suppose, you could express it the other way, but at the end of the day, is the most fundamental units what give us the most useful explanations.
(1) - https://en.wikipedia.org/wiki/Gene-centered_view_of_evolutio...
Natural selection can send a specific gene mutation into an immediate dead end, but presumably across all mutations, it's a net positive for the entire population as they become generally better adapted.
But, populations evolve, not individuals, yes.
I think that the current understanding is that evolution serves the gene, not the population or the individual.