It's possible to factory reset your company MacBook as long as you can enter macOS Recovery.
Try the following solutions!
First, you need to boot into Mac Recovery mode.
- Shut down your Mac.
- Press the power button, then immediately press and hold the Command + R keys until seeing the Apple logo.
- Enter the firmware password if it boots to a black screen with a lock and password field.
- Select a user and enter your password if asked. (If you have FileVault or Find My Mac enabled, you will be asked to select a user and enter the password for it.)
If your credentials are expired or the screen asks for an admin password, you can click the Apple logo in the top-left corner and choose "Erase This Mac," then follow the instruction to erase the internal hard drive and reinstall macOS.
Note: It's best to turn off your WiFi when greeted with the setup window, as an internet connection may activate the Remote Management system.
If your credential still works, you should be able to get into macOS Recovery.
Then, you can erase your startup disk, exit Disk Utility and click "Reinstall macOS" to reinstall a clean operating system.
After the reinstallation, you may constantly receive the "Device Enrollment" notification if it's still enrolled in the MDM (mobile device management) program. In this case, you can bear with the notification or ask the company's IT to release the device from MDM.