that may work, but the 40 yard is very high/tall, (8 to 9 feet tall) the 20 is waist high, put brush in first, crush with the weight of the shingles to flatten the brush out? save some coin....
we used to use wheel barrels, and trash cans to clean up the old roof, once the door has to be shut its easy to fill the box from over the side, with the 40 you have to work to hard to ramp and push it up a pile to dump inside the 40 yard box. and your never getting a thing over the sides of it.
30 yard box is still tall but better than a 40, they be about 6 ft tall.
most roofers opt for a 20 yard box. ease of loading is a big factor.
and if your putting the box in your driveway, and your if your driveway is in good shape, i suggest putting 2x6 or even 2x8 planks under the wheels of the box, and the fronts wheels. in a way so that when the box is picked up, the back wheels roll on the boards until its on the roll off truck, why? 1, it can and will sink into the driveway, 2, it can tear up your driveway when being dragged up onto the truck.
if the box has no front wheels, lay a board across the frame rails of the box, so they don't sink into the driveway. the mid west is know for using dead lift boxes, and they like to cut the front wheels off so the box cant roll away.
if your not home, but leave the planks and instructions when you order the box they should set the planks up for you, if not its always best to be there when they drop it off, make sure the door is clear and opens before the driver leaves. seen boxes backed right up to a garage door, and now you cant open the door. some drivers aren't to smart.