About 4,000 workers will lose their jobs as the payments company does more work with new artificial intelligence tools, its top executive said.