This is where "hell to pay" originated from. In the days of wooden ships the timber that kept them afloat were covered in pitch or tar. The tar was applied to the bottom of the ship, or "hell" as it was called, and the process was called "paying". But before any of this was done strips of rope, wound fiber or hemp were pounded between the planks. These strips were called the "devil".
To sum it all up "paying the devil in hell" refers to pounding strips of fiber between planks and then coating them in tar. The term "hell to pay" refers to the constant maintenance of applying tar to keep the ship watertight. A job which no sailor wanted considering that "hell" was the darkest, dankest, disease ridden part of a sailing ship.
You'll pay the devil in hell or we'll all end up at the bottom of the ocean.