Recommended order for re-shingling a roof and rebuilding a chimney
Definitely do the chimney project first. Any foot traffic on your roof reduces its life by damaging the surface. In the case of asphalt shingles, the granules are the primary weather and UV light protection. Walking on an asphalt roof always degrades the granule surface, especially at the bottom edge of each shingle. That takes years off their useful life.