Rather than considering bucket depth, perhaps surface area might be more appropriate, or perhaps consider a cone shaped bucket where surface area and depth are related.
Photons on a photo detector like rain in a bucket have random variation, but the bigger the area you sample, the better the average you'll get, so you'll have less random noise, and be able to accurately distinguish better between subtle variations as they're more likely to be actual colour variations than random noise.
At the dark end of the scale, the problem is relatively few photons, so fewer stray ones are needed to mess up the average and induce noise.
At the light end, too many photons flood the photo detector and it reaches its limit and you end up with blown highlights.
A larger photo detector can absorb more photons than a small one before it reaches the maximum electrical charge it can attain.
The bucket scale also matters. Even if you have a very deep bucket, but it has a very coarse scale you'll only be able to represent a small amount of data.
Some cheaper sensors sometimes only capture 8 bits per channel of RGB even if they allow RAW, while 12 or 14 bits per channel are common on DSLRs. Every extra bit doubles the graduations on the scale that can be represented.
Imagine two buckets the same depth, but one with an inch scale and the other with a mm scale. In post processing, when you stretch out the detail, the bucket with the mm scale is going to have much more information - say the first inch is black, that's one colour, but there will be about 25mm ie 25 different shades in that same space for the one with the finer scale.
Generally speaking, larger photo detectors, and greater bit depth will give you greater dynamic range. Larger photo detectors for any given sensor size will give you lower pixel resolution so there is a trade off.
This is one of the reasons full frame and medium format sensors are popular with professionals, as they have both large photo detector sites on their sensors and lots of them giving both excellent dynamic range and high resolution.