Into the weeds engine design for fuel efficiency discussion.

There is a dance here. Too small an engine will be working its *** off with a heavy load. The dance part is how often you waltz and how often you Tango.
If you tow a trailer mainly only for 2 weeks for summer vacation, go with the smaller engine. If hauling a work trailer all week, the larger engine will not work as hard, may get a bit better economy and will last longer.

Fuel is energy. Engines turn it into work/power. Work or power required is determined by drag (both aero and friction) and incline.
Proper gear choice and driveline loss will make any two engines near identical, assuming both will produce power in excess of what's strictly required. A smaller engine has far fewer challenges to efficient combustion and extraction of that energy. From friction down to the dynamics in the combustion chamber. Larger bores, longer strokes, and engine weight will all play into the calculation and so yes there is a balance, but the 'smallest capable design' will always win the fuel consumption competition.

An over-sized engine will generally be more durable and easier to operate. But that has exactly zero to do with maximizing MPGs.