There are massive economies of scale at play between a 1000 acre farm and a backyard garden plot.
As a general rule of thumb, if it costs more to grow it at home, it probably has a bigger footprint. The embodied energy and carbon footprint for a few garden tools is more than enough to counteract the entire savings.
Not to say it is always the case. Home crops that grow in native soil with minimal support are great. I recommend tree kale like a madman to just about everyone with a garden.
https://gaertnerbuch.luberaedibles.com/en/tree-kale-8211-the....