Generally we
would be doing the grouting (or color sealing) on a restoration such as yours.
When we grind we always grout first.-If the process didn't involve flattening we would generally grout last.
But that depends on certain factors-if the floor was flattened already we will grout first. If we are removing sanded grout and replacing with unsanded we will do that first.
But the questions on your floor are -un sanded or sanded grout.
Why is the grout being replaced,color choice, stained beyond cleaning?
If the joints are a uniform normal size over 1/16 of an inch you could just color seal the joints after refinishing.
You could add a nice revenue boost to the job.(whether un sanded or sanded)
Seems like it is a commercial job where the grout lines are trashed and they have had it with the polished surface upkeep.
If that is the case it may be possible to refinish the floor to a good uniform hone and color seal all the joints to whatever color they like.