I would be more concerned about all the filth on the FW drains, than the proximity to the gray tank drain. I would clean those thoroughly and disinfect the outsides before draining, since they look so nasty.
You could transfer some of that filth up into the drain in the process of closing or opening the drains. If it's while closing them, and you refill with fresh water, you could have germs growing in the drains and moving into your FW tank.
For the same reasons, I would clean the outside of the gray tank outlet as well.
Just wash the entire area down with some soap and water with a good slug of bleach in it, and rinse well.
If the drains are capped while you are draining the gray tank, you shouldn't have any issues with contamination from the gray water itself.
Single empty-nester in Middle TN, sometimes with a friend or grandchild on board