I suggest you try booting to INTERNET recovery (this is not the same as "the recovery partition").
In each case, power off first.
Command-OPTION-R
at boot
This will install the most recent version of the OS the MBP 2017 will run. Current version is OS 12 "Monterey".
Command-SHIFT-OPTION-R
at boot
This will install OS 10.12 "Sierra".
Decide which one you want, then begin the boot process by using the appropriate key combination.
If you're connecting via wifi, you'll need your wifi password.
It takes a while for the internet utilities to load, so BE PATIENT while the globe spins.
When the utilities are loaded, open disk utility.
VERY IMPORTANT:
Check to see if there is a "view" menu.
If there IS, go to it and choose "show all devices".
Now look at the list "on the left".
The topmost item represents the physical SSD inside.
We need to erase it before going further.
If you're going to install Sierra, choose
"Mac OS extended with journaling enabled, GUID partition format".
If you're going to install Monterey, choose
"APFS, GUID partition format".
Once the erase is done, quit disk utility and open the OS installer.
Start "clicking through".
The Mac will reboot one or more times, and the screen will go dark for a minute or more at a time, with no other indication of activity.
Just be patient and wait it out.
When done, you should see the initial setup screen "choose your language".
Start clicking through.
If you have a backup, have it ready for when setup assistant asks if you wish to migrate from another drive.
Connect the backup drive and let setup assistant "digest" everything.
SA will present a list with stuff that can be migrated.
I would suggest you migrate all of it.
Turn SA loose and give it time to complete the migration.
When done, you should see your original login screen.
Good luck.