There really isn't anything to avoid on a ship other than foods you don't care for.
I agree that I don't like eating at the buffet late in the service where I notice that items are not swapped out as often as they should be. The main reason is not for fear of catching something it's because any food that's been sitting in a steam table for any amount of time over cooks and isn't very good. I've really only noticed this on two cruises. One was NCL and the other Royal Caribbean.
The cleanliness standards on major cruise lines is as high or higher than you will find on land. The adherence to the standards is also kept at a high level.
Are there lapses? Yes: But there are lapses in any restaurant. The main thing is if those lapses are caught, rectified and not repeated.