In my experience it depends on how much the water has got behind the windows currently to how bad the steel is beneath.
I took mine out last year, 20 years in the boat.
The steel behind was in relatively good nick and it was just in primer!!!!!!
Now you mention a full paint treatment primer to topcoat.
As you say in order to achieve this you need to be undercover which isn't practical, with the windows out as well also not practical.
If u were having new windows fitted by a glazing company (marine one) they would measure up in one day, then the second visit would be to remove and re fit all in one day.
No repaint in there. The reason being if the windows are fitting and sealed correctly very little moisture gets to the paint.
So,
Start early one morning
Remove windows
Clean all the steel behind with degreaser making sure all old silicone is gone as with the windows
Lightly sand under where the window has been and paint in primer
Give this time to dry
Use double paste window tape around the perimeter of the window
Re fit windows
Masking tape up
Silicone windows
Job done
A side of you boat a day maybe depending how many windows you have