Having some spare time, I've given this phone another try. Sadly, I don't get anywhere.
[...]
How do I go about doing this? How can I flash partitions when the phone thinks it's locked?
I feel like having all the puzzle's pieces, but being unable to actually put them together. Very frustrating. Do you have any advice?
Uh-oh. The good news is that the bootloader works still but the bad news is that the flash in your phone is indeed physically corrupted/unstable.
At the moment it seems the bootloader lock is activated with a probably random key because of incidentally flipped bits.
I don't know what to do honestly... You could either try to brute-force unlock your phone, but that will only last until the next accidental bit-flip or if you are really desperate you could probably solder out the flash memory from the mainboard and try to get and solder in another one of the same type. I don't think it would worth the hassle though...
Sorry for not being able to help, this is a whole new puzzle we don't have the pieces for. :/