With the teleport pipe they will spit things out straight if they are not linked to an active pipe, however if you put a stone pipe at right angles, when the connection is broken it just loops.
Using Daeds gate idea you could create a loop that stops the engine if items enter the overflow pipe,
__________________
|