You'd think the weight of the dock would keep the barrels in place under the dock, but during a storm, I had one come out. I originally straped them in place with galvanized band, but it quickly rusted right thru. I'm not sure how bungee cords would hold up under water continuously, but at least they wouldn't rust! I would think long rubber straps or even a small diameter stainless steel cable would be sufficient.
I'm having trouble visualizing how to tension the stainless cable against the barrels but I agree that the stainless steel cable sounds like a winner for durability. I don't know about the life span of the bungee straps for 24/7/365 use because my FIL's dock is a seasonal swimming dock but I can ask him about the life span of his bungees under seasonal use conditions the next time I talk to him for you.