Untouchability is as old as the Hindu varṇa system which also includes the caṇḍālas – persons of the lowest and most despised of the mixed castes.
The Āpastamba Dharmasūtra says it's a sin to touch a caṇḍāla:
Thus after having undergone a long punishment in the next world, a person who has stolen (the gold of a Brāhmaṇa) or killed a (Brāhmaṇa)
is born again, in case he was a Brāhmaṇa as a Cāṇḍāla, in case he was
a Kṣatriya as a Paulkasa, in case he was a Vaiśya as a Vaiṇa.
In the same manner other (sinners) who have become outcasts in consequence of their sinful actions are born again, on account of
(these) sins, losing their caste, in the wombs (of various
animals).
As it is sinful to touch a Cāṇḍāla, (so it is also sinful) to speak to him or to look at him. The penance for these (offences will be
declared).
(The penance) for touching him is to bathe, submerging the whole body; for speaking to him to speak to a Brāhmaṇa; for looking at him
to look at the lights (of heaven).
There are references to caṇḍālas in Vālmīki Rāmāyaṇa as well.
So untouchability must be at least as old as the Āpastamba Dharmasūtra. But how old is the Āpastamba Dharmasūtra? According to Wikipedia:
Kane estimated that Apastamba Dharmasutra dates from approximately 600-300 BCE, and later more narrowly to between 450-350 BCE. Lingat states that the internal evidence within the text hints of great antiquity, because unlike later Dharma texts, it makes no mention of Buddhism. Other scholars, such as Hopkins, assert that all this can be explained to be an artifact of its relatively remote geographical origins in Andhra region, where refined Sanskrit grammar and Buddhist ideas may have reached much later, and he places the text to the 2nd-century BCE. Olivelle, and several other scholars, in contrast, state that the first version of Apastamba Dharmasutra may have been composed after others, but the extant version of the Apastamba text is the oldest Dharma text from ancient India.
Regardless of the relative chronology, the ancient Apastamba Dharmasutra, states Olivelle, shows clear signs of a maturing legal procedure tradition and that there were Dharma texts in ancient India before it was composed.
Can somebody provide any reference for the statement that "untouchability started in 12th century"?
To be clear, the critic uses the words 'first recorded' and there is a difference.
Untouchability and caste inequities are first recorded in the 12th century CE when India had already been subjugated by Muslim conquerors and then Christians.