First off yes, higher RAM and SSD capacities will use more energy and produce more heat (either because there are more chips being used, or because there are higher-capacity chips being used). But the difference in terms of battery life is incredibly minimal, especially since the M-series chips use LPDDR RAM instead of regular DDR RAM. The CPU type will have a greater impact on battery life than RAM or storage capacity.