Let me preface this with: I'm no expert and don't know exactly what I'm doing.
However, I was in your same situation. My phone previously was encrypted and had a passcode. I did the factory reset and couldn't get past the X. Tried clear cache afterwards, did the recovery volume up + power...