Ventura docs for M2 Macs in this comment: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd?permalink_comment_id=4555340#gistcomment-4555340
Old Monterey docs in this old revision: https://gist.github.com/henrik242/65d26a7deca30bdb9828e183809690bd/32c410e3a1de73539c76fa13ea5486569c4e0c5d
Solution for Sonoma: https://gist.github.com/sghiassy/a3927405cf4ffe81242f4ecb01c382ac
Let me know if you try this! I'm very much thinking of doing the same. Verified the computer didn't have iCloud lock or Activation Lock. No Profiles either. However once I performed a full erase I was alerted to MDM and required to provide an email address connected to some random company. Apple really needs to make it explicitly easy to tell if a computer is stolen, MDM-locked, iCloud-locked, or otherwise Activation Locked.
I really wish they'd just have an About This Mac --> Check activation status --> "All good" or "Not good, MDM-locked" etc. Total bull$#!%