If you replace outdoor crops with forests, they'll sequester much more CO2.
In principle you can replace many acres of outdoor crops with one acre of greenhouse crops: with electric illumination you can make plants grow during nighttime, and with controlled temperature you they can also grow during the winter.
Irrigation also needs much less water in a greenhouse (because plants lose a lot of water via transpiration, and in a humid environment they transpire less). Not to mention that you can recycle the water in a greenhouse.
Irrigation is a big component of the energy expenditure of crops, but not the only one. All other components will decrease. Fertilizer, pesticides, tilling: you just don't need huge tractors to go miles and miles to the fields. You can have much smaller machines doing the job on the spot.
I'm not saying greenhouses are the solution to all the world's problems, but they shouldn't just be discarded outright.