This will not work or be supported as you are fundamentally changing the device's identity and also break the HAADJ as this relies on AAD connect syncing the object to AAD. There is no graceful, supported path to do what you've asked about (or one that actually works to my knowledge). Also, keep in mind that even if this technically could work, you'd be orphaning the user's profiles so the value of doing this in-place is limited at best.
The best, supported path here is to reprovision the endpoints and AADJ them (as we strongly discourage HAADJ for new endpoint provisoining).