I think the easiest thing is
i) when you leave the boat -- or you're at a dock with water, flush the head and lines with fresh water and leave it in the lines leading to discharge; and
ii) DON'T LEAVE CONCENTRATED URINE AND EXCREMENT in the lines, i.e., flush the lines with salt water each time you use it. I you use a holding tank, then just get used to emptying it more often; or else you'll have to deal with oclusive curse of the lazy arm syndome. ;^)