Origins of "screwed the pooch"?

I’ll elaborate on what I know.

I worked in a Toronto warehouse for some time; and I drove a truck too, out of a GTA yard. In both cases, “dogfucker” was an epithet applied to a guy who was lazy, didn’t pull his weight, and so on. New workers in both situations had to prove themselves in a hurry; otherwise, they were tagged “dogfuckers.”

Oddly enough, while “dogfucker” was not complimentary, the term “dogger” was. It was derived from “dogfucker,” but was used, usually humorously, with workmates who were known to be hard workers, but who had a momentary brain fart. For example:

Bill: Hey, Jerry, heads up.
Jerry: What? [crash]
Bill: Jerry, you dogger. Get a broom and clean that up!
Jerry: Yeah, okay. Thanks a helluva lot, Bill.

Jerry works hard, and Bill knows that, but he’s just having a bit of a dig. And Jerry will get his own back at Bill–no doubt, before the shift is over, Bill will be tagged as a “dogger” by Jerry. And after they punch out, they’ll likely go for a beer at a nearby bar, and have a good laugh. But the point is, that “dogger,” which is derived from the original “dogfucker,” is a friendly dig between friends; while the original term is an insult.

As I understood it from the context of “The Right Stuff”, to “screw the pooch” meant making a mistake that would have been no big deal had no one been watching, but in front of an unexpected audience would result in tremendous shame and humiliation. The example was Gus Grissom allegedly blowing the explosive hatch bolts on his Mercury capsule after he splashed down, sending the capsule to the ocean floor.Conventional wisdom was that in so doing, Grissom “screwed the pooch”.

Wait…what? The CF reserves are where I was introduced to this expression. Everyone on my course was called a ‘dogfucker’ by certain MBdrs…mostly maritime ones.