@Umair Akhtar
I think you should use the Device Update feature. It was in preview and recently added as GA.
https://learn.microsoft.com/en-us/azure/iot-hub-device-update/understand-device-update
You can run firmware updates with the help of this feature and combine it with automatic device management to categorize the devices and
run updates in batches.
and in case of running direct methods (giving and command device)you can use Jobs