In such a situation I would back up all the drivers before doing any cleaning job, using this command in command prompt console with admin rights:
dism /online /export-driver /destination:E:\DRIVERS
where E:\DRIVERS is the folder you would like to keep backup copy of all the drivers installed including the duplicate drivers, old drivers, redundant drivers, whatever.
Now you have a good backup of the drivers. You can now do the cleaning of the drivers and restart Windows. After restarting, you may see exclamation marks besides some devices in Device Manager. In this case, you choose that device and update its drivers, pointing to the backup drivers folder E:\DRIVERS.
Windows finds the correct driver file for that device and installs it. If there are others you repeat the procedure.After Device Manager does not have any unknown device, then you take another backup of the drivers.
You keep this drivers backup folder for later use if need arises.
Hope this helps.
Edit: I used

: drive letter and forum script placed an emoji in place of D: I changed D: to E: