Tim Cook is among the growing number of people in Silicon Valley airing concerns about the potential dangers of technology.