Wikipedia: Carpet Cleaning
The concept that walking barefoot on a carpet may lead to damage from body oils has not been supported or dis proven by standardized reports or testing or by industry evidence.
This is of course Wikipedia, which like the tales of sailors, may be believed or disbelieved as you like.
Personally, I am sceptical about the idea of bare feet ruining carpets; people go bare foot inside in the Middle East where they have the finest carpets in the world. It is probably shoes-on propoganda.
What will damage carpets is keeping your shoes on at home, or letting visitors keep their shoes on.