No entry sign on 2017 Macbook Pro--will replacing the hard disk work?
Why not install a fresh copy of macOS on an external drive before you make any changes to the internal drive. This Mac supports internet recovery so you can boot to internet OS - use Disk Utility to erase / prepare the external drive (USB or Thunderbolt is fine) and then download the installer from the internet while in recovery boot.

Now you can boot to the external drive and make sure the system is healthy and see if you can wipe the internal or need a repair.

If you have nothing to lose on the Mac, follow Allan’s excellent answer for how to erase and install without pausing to work on an external drive.