Nearly 100 days since Islamic State-linked militants occupied the southern Philippine city of Marawi, the army says it is planning a final assault to end a battle that took Manila and allied countries by surprise for its stubbornness and violence.

If successful, the operation will allow the tens of thousands of residents who fled to return...