The original hard drive stopped working, so I got a new SSD (Crucial MX300, 275GB, part number CT275MX300SSD1) to put into the MacBook Pro and make a clean install of macOS.
Installation of High Sierra using an USB drive looked like it went through well, but when the MacBook Pro rebooted, it got to a screen where it just shows a flashing folder icon with a question mark inside.
After that failed, I tried a second time using Network Recovery and installed Mountain Lion. Same flashing folder icon after reboot. NVRAM reset did not fix the issue.
After wiping the drive once again, I immediately ran a volume check using Disk Utility and it told me that the volume was damaged.
So maybe the issue lies on the SSD itself?