It seems like you're encountering difficulties restoring your iPad 7th generation, even when attempting a factory reset using iTunes or Finder. Despite trying different cables, computers, and operating systems, the issue persists, leading to a "lost connection" error.
You've also attempted to put the iPad into DFU mode without success. Given these efforts, it's understandable to wonder if the problem lies with the device's memory or possibly a broken data line in the charge port.
While changing the charge port could potentially address a broken data line issue, it's essential to consider other factors contributing to the problem. For instance, if the device's memory has failed, it could prevent successful restoration attempts regardless of the charge port's condition.
At this point, seeking assistance from an [link|https://locate.apple.com/|Apple Authorized Service Provider|new_window=true] or contacting Apple Support directly may provide more insight into the underlying issue. They can conduct further diagnostics and recommend appropriate solutions to resolve the problem with your iPad.