To grant device owner rights to the MDM applications via adb, no accounts must be installed on the device.
So in your case MDM cannot be installed, and the only way to install it is to reset the device to factory defaults (the account installation action is irreversible).
If you're thinking about the workflow of installing MDM on devices, then I recommend you first install MDM, and then add an account. As far as I know, this sequence is allowed by Android.