a strong fresh weight value is 0.1%, this is rare though
length is basically worthless, weight is the only thing you can make a reasonable estimate on
I have a plant that is 6-7 inches wide, and I have a plant that is about 1-1/2 inches wide... estimating weight is worthless, 6 inches of the larger plant weighs more than 4 times what the 2 feet of the thinner plant does...
One simple method is to weight yourself, and then weigh yourself again holding the cactus in question and then you have a basic indication of weight (the difference of the two values), not exact but pretty good
1000g of 0.1% cactus (fresh weight of course) is going to have 1g of mesc or so
so for 4 grams you would want about 4Kg, about 9lbs worth...
however 0.02-0.04% (fresh weight value) is a lot more common (though still pretty good compared to some common clones out there)
1000g is going to be 200-400mg, and 200 seems a lot more realistic, so for 4 grams you would want about 10kg, about 22lbs worth.
if your 4 foot section weighs 22lbs you might get 4grams
I agree though that you would be lucky to get that
cactus is mostly water (90-95% is common)
a gallon of water weighs a bit over 8 lbs
basically 3gallons volume of good cactus is in the area of what you could get 4g from, but as extractions get scaled up efficiency decreases, a small scale extraction tends to be more efficient than a larger one
I know of someone who recently obtained about 4 grams (3.8g) of fairly pure mescaline acetate from a volume of around 3-1/2 gallons worth of blended cactus...my understanding is that more than 4 feet of cactus was used.
good luck