Zipp 303 S can handle up to 50mm tires. It has a 23mm i.d. and 27mm o.d.
The 303 Firecrest is 2mm wider and can handle up to 55mm tires.
40mm tires are going to be wider than any rim you'd want to run on a gravel bike, so "mushroom effect" is relative here.