With plenty of water and soap available to most of us today - sex is not an issue of impurity - unless too many partners are involved. Then once again a religious no-no like promiscuity proves to be good advice scientifically because promiscuity can affect ones health and emotions quite negatively. None of these unhealthy, "dirty" behaviors in and of themselves affect one's soul and eternal life, though. It is not about the sex as so many religious people misunderstand. Spiritually what matters is whether there is abuse, greed, fear, or insincerity involved - be that sex, money, power, or any other area of life.
Even with lots of water and soap - a woman, man, or child who has been raped, for example, feels dirty and often continues to try to wash this feeling away. This is a physical/psychological phenomenon that also is real. The body and the mind can become polluted like water and air can , but we are neither the body nor the mind. Therefore - the eternal, infinite soul is always untouched. We are inherently pure, even if we fall face first into the mud.