Apple is on top of the world. That may be John Ternus’s biggest challenge, but also his largest opportunity. When Ternus steps in as Apple’s chief executive on Tuesday, he takes over the world’s second-largest company by market capitalization, valued at nearly $5 trillion. Starting from such lofty heights, it could be difficult to continue the company’s remarkable climb. There is one way, which company observers have said has been lacking since the Steve Jobs era: revving up Apple’s innovation engine, especially in artificial intelligence. Tim Cook’s brilliance was to take the company Jobs built and scale it, massively. The…