It is highly unlikely that anything you are describing is to do with software at all.
Apple don't design the iPad to be user serviceable from a hardware perspective, and your device has now had 2 significant hardware replacements.
You really have to be a very good technician, and be absolutely diligent about the repair, to do significant hardware replacements on an iPad and and get it back to perfect working order.
Since the previous owner already did a replacement there is absolutely no way of knowing how they went about it. Sounds very much to me like you have a bad digitizer connection, but also that the WiFi antennae have been moved / shorted / or something.
But, other than stripping the digitiser out again and re-assembling incredibly carefully (correcting any issues which may have been introduced along the way), you are unlikely to get the device back to a fully reliable operations. Sorry
But to be clear, based on my experience, no amount of IOS restoring is going to fix it. The problems are definitely hardware, not software.