"Theoretically, is not another growing peril of indexing that it removes incentives for companies to behave well or outperform, since if they're part of an index their shares will be bought automatically by retirement plans and investors anyway, irregardless of performance or competency?"
You don't have to look far to find this ... a great example is Restoration Hardware, which very recently borrowed money to buy back roughly half of the outstanding shares:
"The move has caused the company to consume basically all of its available cash balances and debt to increase by $500 million. In consequence, stockholder's equity has swung from $920 million at the end of the company's last fiscal year into slightly negative territory."[1]
This squeezed the shorts as well as (to the uninformed) bolstered their EPS dramatically as there are half as many shares now outstanding.
Nobody but an industry insider or other market-specific trading desk would have any interest in a disaster of a stock like this, and yet RH is in the Russell 3000 and is therefore auto-purchased by savers and retirees everywhere.
"if everyone is indexing, it surely must lose it's efficacy because it is no longer efficient, will indexing then not underperform?"
This was explained, I think, very succinctly in the Dave Collum "year in review"[2] wherein he explains:
"In his must-read book The Wisdom of Crowds, James Surowiecki posits that a large sample size of non-experts, when asked to wager a guess about something—the number of jelly beans in a jar, for example—will generate a distribution centered on the correct answer. Compared with experts, a crowd of clueless people offers more wisdom. I submit that this collective wisdom extends to democracies and markets alike. A critical requirement, however, is that the voting must be uncorrelated. Each player must vote or guess independently."
And that is precisely the issue we are worried about facing with index funds - we are buying indexes so as to access the (real, efficacious) wisdom of the crowd. However, if nobody actually makes a best guess - if there are no participants in the "guess voting" the wisdom of the crowd is lost.
[1] https://seekingalpha.com/article/4104757-shorts-restoration-...
[2] http://www.zerohedge.com/news/2017-12-23/dave-collums-2017-y...