Stuck at Google screen, recovery mode just turns the screen black
FAILED (remote: flash write failure)


Indicates your hardware is dead, so replace the main board or the whole device.

It was designed with a built in limited lifetime of maybe 100,000 writes. LG had to cut some corners to make the Nexus 5 so cheap which is maybe why they die a bit sooner than a flagship device of more then 3 times the cost.

You could try heat annealing the memory but you would need some electrical engineering toys to recover from the resulting hard brick (the firmware would be wiped).