Pope Francis challenged leaders of the world’s wealthy democracies Friday to keep human dignity foremost in developing and using artificial intelligence, warning that such powerful technology risks turning human relations themselves into mere algorithms.