First we must examine the overall pixel export rate, not the frame export rate. It is pixel export rate that defines the amount of work:
3840 x 2160 x 63 fps = 522,547,200 pixels per sec
1920 * 1080 x 240 fps = 497,664,000 pixels per sec
1280 * 720 * 320 fps = 294,912,000 pixels per sec
So it's actually processing more total pixels per sec in the 4k case.
4k has about 400% of the pixels of a 1080p frame and, at the same frame rate, requires about 400% of the computation, whether that is handled by software or hardware.
For the 4k export case, it's likely the hardware encoder handles most of that, thus the low power consumption. 522 million pixels per sec might be the single-encoder limit for that case. Since the encoder is specialized hardware, it does most of the work, not the CPU threads or the GPU. Hence power consumption is low.
The M1/M2/M3/M4 Max have two encoders and the M1/M2 Ultra and upcoming M4 Ultra have four encoders. Using FCP's segmented encoding feature, those will export faster even on a single output file.
But your M4 is probably already faster than most other machines at exporting.
For the 1080p case the export pixel rate is a little lower than at 4k, but it apparently takes more power. That might be due to CPU or GPU activity required to downscale the material to 1080p. Encoders don't scale, just encode. So something in the pipeline must downscale that before submitting to the encoder. That could have a power cost.
For the 720p case, the pixel export rate is considerably slower than 4k and 1080p, and power consumption is higher. Like the 1080p case, that could be due to CPU/GPU computational cost of scaling before handing to the encoder. The export pipeline may have maxed out the available CPU/GPU resources to downscale the material before handing to the encoder, which could explain the even higher power consumption and the lower pixel export rate.
Suggestions: Don't use multi-pass H.264. That is not needed, and there is virtually no quality difference.
Try single-pass H.264 vs HEVC (H.265) and examine the relative encoding speeds on your machine.