The best way to factory reset a DEP device is to do the following in the Control Tower:
- Settings > System > enable Re-enroll Apple devices in the previous device group > Save
- Devices > click on the name of the device group > put a check in the box next to the iPads you wish to factory reset > Select the Erase Device button at the top of the list.
- Enable Clear Activation Lock
- Enable Delete Devices from Control Tower
Once the device factory resets, follow the prompts and the device will be enrolled back into the Control Tower.