The concept of Dalits is a fairly new and a part of post Invasions India. The varna system or the caste system never was the way it is today. In the original form, It was defined by the job you do not by birth. A lower caste was free to acquire skills and upgrade himself, this was much like how corporate world works today. The whole system got corrupted for numerous reasons but it would be wise of you to not associate it with the religion. It was never part of religion the way you are trying. Hinduism was always an open religion with a lot of freedom to do things you think is right a good example of it is a book on sex postures i.e. Kamasutra.to add to it, we have temples depicting the same. This was accepted norm because we considered it part of normal human being's life. Along with Hinduism our land came up with religions like Buddhism, Jainism, Sikhism and we are all in love with each one of those.