If you are over a barrel you are in deep trouble, helpless, in someone else’s power.
Before CPR was taught as a life-saving maneuver, a drowning victim would be placed face down over a barrel and the barrel would be rolled back and forth in a effort to empty the lungs of water. It was rarely effective. On occasion, some people may have been draped over a barrel in order to receive a flogging.
My research says this is an American phrase and first appeared in the mid-20th century, but I think it’s older than that. I can remember, when a child, hearing it used by seniors. The first printed reference seems to be in 1938, in a cartoon from the Pennsylvania newspaper The Clearfield Progress.
In 1939 Raymond Chandler used the phrase in The Big Sleep when referring to a gun. “We keep a file on unidentified bullets nowadays. Some day you might use that gun again. Then you’d be over a barrel.”