Get yourself a direct read infrared thermometer and simply follow your hosing and cooling components to develop a profile of the 'heat soak' of your engine after running for a goodly amount of time.
Start at the exhaust outlet and simply measure each individual component of the cooling system ... and record. Any blockage, failing thermostat will show up as a significant change in temperature.
The 3QM has its temperature sensor located near the front of the 'valve cover' ... and that place is where you do a quick check of the engine temp. with an infrared direct read thermometer on a 3QM.
These temp sensors can go bad quite often ... and all the wiring back all the way to any gage readout & sometimes needs to be also replaced. For the temp 'sender', there are several thread configurations (some are tapered threads some are straight thread connections, so if you suspect the temp. sender is at fault, you should remove it, check thread profile, etc. and not blindly order from a Yanmar dealer.
On a 3QM engine the chief suspect for gross overheating is the development of 'slab rust' inside the exhaust manifold wherein the loose slabs will constrict the water passages. If this is the case, be VERY careful in removing the internal rust slabs from the inside of the manifold ... as these old manifolds are very RARE to impossible to find from a dealership and usually need a specialized cast-iron metal-magician to repair/'rebuild' ... especially when there are 'pin hole' internal leaks of the manifold ... and should be periodically checked by gentle 'pressure testing' of the 'water side' of the manifold.
FWIW --- to preserve the old manifolds, never ever drain the manifold and leave it 'dry' for long term lay up. Always fill with ethylene glycol antifreeze (including rust inhibitors) and 'well boiled' distilled water when long term storing. "Running the hell out of such a cast iron engine" will keep a goodly layer of 'black rust' inside the water passages ... the black rust is 'protective'; but, will turn gradually over time into destructive red rust if you dont store with antifreeze and rust inhibiters when storing the engine long term.
Hope this helps.