Is 'I f*cked the dog' an actual idiom and are there alternatives
"Fuck the dog" (or its milder variant, "screw the pooch") comes from an old joke.
There are various versions, but a drunk man ends up shooting the wife and screwing the pooch (instead of the other way around).
It is certainly not about idleness, but epic failure to get a sequence right. Janus Bahs Jacquet's suggestion of using the literal translation of your German idiom is probably a lot closer to the mark for what you need. If you want something a little more sanitized, try "scratching our backsides*" (or use another body part to replace "balls").
*originally I had "heads" here, but Janus points out that that strays into a different meaning.
If you want an idiom that's still mildly vulgar, but still gets used in daily speech:
"We are just sitting here with our thumbs in our asses, (waiting for something to do)"
If you wanted to capture the spirit of the German, you could say
We're just sitting here playing with ourselves while upper management is deciding which approach to take.
or
I'm not doing much of anything, just sitting here playing with myself.
In a workplace context, it would not be taken literally. :)
P.S. It's not the sort of thing men would typically say in mixed company at the office, however. Though I imagine that it could be said, given the right personalities. You might hear female military personnel saying this, for example, "co-opting" male lingo.
The commonest expression I can think of to express boredom is "to twiddle one's thumbs". "Screwing the pooch", while an idiom, has an entirely different meaning: to spectacularly mess up, usually in an embarrasingly public way.
I don't know how commonplace it is, but the phrase jerking around is what I would use in this situation:
"Quit jerking around and do something productive!"