My understanding is that the German economic exploitation of the invaded territories involved the use of forced local labor in factories producing all kinds of military hardware. How did they prevent sabotage of equipment and are there any instances where sabotage during the production process managed to have any effect on the war effort?
Sabotage was always a risk when using forced/conscripted labour in war production factories. The threat of brutal punishment (up to and includind death) could serve as a deterrent, but it was never 100 percent effective.
I don't know exactly if or how the Germans went about trying to combat sabotage by forced labourers, or even how aware they were of it, but I can provide two examples of this type of sabotage that went undetected and were discovered later.
The first comes from Chapter 20 of "The Guns of Normandy" by George Blackburn (Blackburn was a Junior Officer serving in a Canadian Field Artillery Regiment). On a gun position north of Caen in 1944, it was observed that many of the artillery shells fired by German guns were not detonating. Several of these shells were dug out of the deep (over 9' in one case) holes they drilled into the earth. Upon examination, it was discovered that the impact fuses had been deliberately tampered with at the factory so that the shells wouldn't detonate. As Mr.Blackburn notes, this courageous act of resistance by workers at a Czech munitions factory likely saved the lives of hundreds (if not thousands) of allied troop's lives, and had a serious negative impact on the effectiveness of German artillery fire during the fighting in Normandy.
The second case involves a rocket-propelled Me-163 Interceptor. In the mid 1970s, the Canadian Aviation and Space Museum restored one of the two Me-163s in their collection. During the extensive restoration process, restorers discovered that two critical systems had been sabotaged, either of which could have resulted in the destruction of the aircraft had it been flown:
The glue used to bind the skin to the frame on the wings had been tampered with so that it didn't adhere properly. Museum staff theorized that soap had been mixed into the glue to stop it from curing correctly.
A small rock was found wedged between the fuel tank and its support frame. Had the tank been filled and pressurized, the rock would puncture the tank. Due to the highly volatile fuel/oxidizer mix used to power the rocket motor, this would've resulted in some impressive (and highly destructive) fireworks. The museum's website has some more details and photos: https://ingeniumcanada.org/aviation/collection-research/research-messerschmitt-me-163.php