Actually no harm for you to try if you want to format your device. But please do make sure that you backup every single thing on your phone first because once you do a format, your data and other details will be erase.
Some people did format the phone and the problem fix (even after update to the latest version) but very rare it happen. You can try your luck (no harm).
This kind of issue surely need Samsung help but if you go ask them, they will surely ask you to replace the display (which cost you like crazy). But please note that once you replace the display, they won't guarantee you that the problem will not happen again.
You can check the screen replacement cost below:
If your phone is like more than 2 years old, i suggest that you better don't repair it and just get a new phone which is more worth. Unless if you still want to use the phone, then no choice to repair it. If it is under warranty then it will be great else, you have to pay for it.
If you feel that the brand do not satisfy you, it is good to try out other brand. No harm because we, as a consumer, that's our rights. No right or wrong.
FYI, many Android's phone got this issue already and not just happen on Samsung devices. Even Epal got this problem too maybe just not that frequent compared to Samsung (fyi, they use Samsung and BOE display). The only matter is their warranty only.
Good news is Epal will be officially open their store in Malaysia soon. Meaning is, their servicing is much more better than those retail one for sure (you should know what i mean). Lol