This is turning into a hardware design discussion, perhaps outside of this board. My short feedback, trying to fix perceived hardware problems with software is perhaps an idea you’d want to revisit. MOSFET gate control must be done in the hardware. There are extensive research and practical guidelines and examples on designing correctly a half-bridge, it has nothing to do with stepper motor design.
I’m not clear on why you believe real-world gate currents would be any different that the ones you have calculated/simulated, and differ so much you need to adjust them real-time in the software. As long as the half-bridge does not cross-conduct, there is no point inserting extra dead time, unless you are designing for some extremely complex use case where the slew rate must be adjusted in real-time to prevent RFI, in which case you just calculate the maximum slew, then set the gate driver schematics correctly with all the required diodes, resistors and capacitors to reroute and adjust the source and sink currents and fix the dead time to match the max slew. As I mentioned, there is an extensive body of research and practical examples about designing half-bridges. This is a very mature field, there is nothing new. OTH you may have a use case I’m not aware of, so may be you do need dynamic deadtime adjustment, I’m not sure.
Cheers,
Valentine
PS there are very sophisticated drivers that also monitor the MOSFETs cycle-by-cycle and adjust the current during the on/off phases. If your use case is so complex, perhaps you may want to pick the correct driver. There is absolutely no way you can do this in software, for example monitoring the Miller gap and such. This is done in the driver.