Welcome to Apple Support Communities.
It's my understanding that your iPhone X screen flickers intermittently. You're on the right track on trying to determine if the issue is hardware or not and I do have one more suggestion to try. Before doing so, however, it would be best to make sure that you have a current backup of your data: How to back up your iPhone, iPad, and iPod touch . To rule out software being the issue, restore your iPhone to factory settings using this link: Restore your iPhone, iPad, or iPod to factory settings
Set up the iPhone as a new device and then test to see if the screen continues to flicker. If it does, then it's more than likely a hardware issue. I'd also recommend contacting Apple Support or making a genius bar reservation prior to visiting the Apple Store.
Keep us updated.
Thank you for using Apple Support Communities.