Yes. Cracks, spalling, and loose sections need to be addressed before any coating is applied, because painting over damaged stucco traps moisture and accelerates deterioration.
Surface prep includes pressure washing, scraping, crack filling, and caulking, all completed before priming and finish coats.