JAKARTA, Indonesia—A large part of Joko Widodo’s appeal when he became president of the world’s fourth-largest nation last year was that he wasn’t part of the country’s old elite.

Voters and investors bet that if anyone could shake up and modernize Indonesia, it would be the plain-speaking Mr. Widodo, a former owner of a furniture business and a small-town mayor.

But...