The phrase screw the pooch, meaning to mess up, commit a grievous error, was made famous in Tom Wolfe's book The Right Stuff.
The phrase is a euphemism from US military slang.
The original expression was fuck the dog and meant to waste time, to loaf on the job.