I understand how water content helps compaction, by being kind of a lubricant between the soil particles, that helps them slide into position. But I don´t really understand how it starts affecting negatively after surpassing the optimum water content, but not surpassing the zero void line.
Beyond a certain level of saturation, the bulk modulus of water starts playing an important role. Since water is nearly incompressible at moderate pressures, the pore pressure increases rapidly and equilibrates with the externally applied force when we try to compress the water. This makes it difficult to compact fully saturated soils and partially saturated soils with a large water content under confined conditions.
For a given compaction energy, this is a volumetric problem. Keep in mind that we are working with a given volume (say 1 cubic metre) of dry particles (solids), water and air, thus:
Compacted soil = dry particles + water + air
Dry particles, for example sand (cohesionless soil), as oven dry, can be compressed to form a granular skeleton that contains air within the voids between particles - but air has no mass (weight). The density that we can get will depend upon the grading and shape of the particles, and how tightly they will align under compaction force.
Now we add water to the dry particle mixture and compact it. Water has mass (as compared to air). So we can gradually fill this dry air void structure with water - displacing the air - and the overall density of the mixture will increase.
But if we increase the water content too much, it will start to displace the soil particles within the given total volume. So the lesser density component, water, will now be a greater proportion of the mixture. This will cause the mixture density to decrease overall.
This is why there is an optimum moisture content. For a given compaction effort, there will be an optimum moisture content, beyond which the density starts to drop, because soil particles are displaced by the lower density component, water.
For clays, these same general concepts will apply but there are other factors at play, such as the type of clay and it's affinity for moisture, the alignment of the platelet structure and other features.
Generally speaking, there will be air within the compacted soil structure, even at the optimum moisture content. The higher compaction energy will remove more of the air, for example modified proctor tests yield a higher density than standard proctor tests, but there will still be a small percentage of air in any case.
Water is incompressible. Remember this fact.
Once the water content is exceeded you reduce soil structural strength and therefore its load-bearing capacity. As you try compact a drenched soil you are trying to compress the incompressible. Once the liquid limit is reached you cannot compress the soil any further. To compact soil you need to effectively remove whatever is in the soil void spaces. When water eventually drains there will never be a time when there is no water in the compacted soil.