Chosen Solution

I just got a used iPhone 7 Plus, and it has a cracked screen. I experience ghosting when the iPhone is plugged in (charging), especially when the device is warm or hot. The iPhone was never been opened/repaired, and every parts in the iPhone are still original.

Does a cracked screen cause ghosting (self touch) or is it something else?

It’s sounds to me that when it was dropped it also damaged the digitiser. You would need to purchase a new display, I’ll link the replacement guide below; iPhone 7 Plus Screen Replacement

It is possible that the cracked screen is causing the ghost touch, but you can be sure when you replace the screen. Otherwise it is a gues.