I need a bit more information...
The make/model of your toilet doesn't matter, and I don't think it's a bad joker valve either...but I do need to know:
Is the bowl actually overflowing? Or are you just seeing what seems to be waste water in the bowl? If so, how much?
You said, "pump it clean, then for the next hour no overflow"...ok, then what happens?
Does this happen when you're motoring, keeping the boat upright? Or only when you're heeled on a particular tack? Or both? Only when you're underway or when the boat's at rest too?
If the bowl is actually overflowing, and it happens only when you're heeled, how full is the tank? Or does it happen when the tank is empty too? Where is the inlet fitting on the tank located--outboard (next to the hull) or inboard (away from the hull toward the centerline)?
How far is it from the toilet to the tank? Is it uphill all the way? Any loop, vented or not, in the head discharge line?