Agreed, I've come to learn how risky it is. This was an eBay purchase, and there was no mention of the MDM lock/enterprise ownership in the listing. Fortunately it was a reputable seller with a good return policy, they immediately contacted the previous corporate owner and the MDM lock was removed remotely.Best of luck, this is why I don't ever recommend buying surplus enterprise devices for consumer use
Once I reset the device, the lock was gone and bootloader unlock option was no longer greyed out in developer options. Just unlocked the bl with no issues. Got lucky.