It's not only the typical improvements in chip technologies: form factor also plays a significant role here [1]. It's also worth noting that the M4 Pro supports three (or more?) displays.
From a business perspective, I'm eager to see Apple’s Q4 and Q1 reports. My hypothesis is that they might be reshaping the desktop market with these Mac minis.
I think one of the next milestones could be to achieve a fanless model.
[1]
Height: 4.97 cm (1.96″)
Width: 12.70 cm (5.00″)
Depth: 12.70 cm (5.00″)
Weight (M4): 0.67 kg (1.48 lb.)
Weight (M4 Pro): 0.73 kg (1.61 lb.)