Using the Rackers calculator, 40 lbs of grain mashed in 20 gallons (80 quarts) of strike water results in 23.2 gallons(92.8 quarts) of mash. You will lose about four gallons to grain absorption, leaving 16 gallons preboil, boil off 2-3 gallons leaving you well ahead of your goal of 12 gallons. 16 gallons preboil also appears reasonable in a 25 1/2 (102 qt) gallon kettle.
To send 12 gallons of finished wort to the fermenter, I think the 102 qt, 25 1/2 gallon kettle is adequate, unless you plan on making some very, very high gravity batches. Even on the remote chance that you needed to exceed the kettle volume, you could incorporate a simple sparge pouring sparge water through the bag / basket to collect additional wort.
All that said, the larger 122 qt (30.5 gallon) kettle would allow expansion to 15 gallon batches, or the filling of 3, 5 gallon kegs???