Chosen Solution

I bought and iPhone 6s from a dealer on the market. I couldn’t get time to check it so I came home and factory reset the phone and then found out that it has a remote management lock(MDM) lock on it. I was wondering what if I change the motherboard? Will the remote management lock be removed to make the phone a new one??

typically you cant get passed this, its used to deter thieves from reselling stuff they’ve stolen. https://support.apple.com/en-us/HT202804 you need to find out where this dealer got their supply from. otherwise you maybe completely out of luck