You really need to make sure the brake is empty.
Open the bleed ports, wind out the TPA, pump the lever and make sure everything is out, and then leave it for a bit to dry. Then you can start bleeding it with oil.
You could try bleeding it hard with water to clear the sludge and then letting it dry out, that might clear the sludge.