Your device has had serious problems also earlier, so I wonder if the hardware (especially flash) is ok.
Your earlier survival story:
It might be that there is something wrong, e.g. a bad flash block at a place that strategically causes problems for a firmware/kernel of certain size. E.g. a bad block just where the UBI should start, or somethings similar.
Reference to your log:
[ 2.174114] UBI: auto-attach mtd1
[ 2.177563] ubi0: attaching mtd1
[ 2.264332] UBI: EOF marker found, PEBs from 28 will be erased
[ 2.271166] ubi0: scanning is finished
[ 2.309952] ubi0 warning: 0x8046a910: error -5 while erasing PEB 991, retry
[ 2.317238] ubi0 warning: 0x8046a910: error -5 while erasing PEB 991, retry
[ 2.324496] ubi0 warning: 0x8046a910: error -5 while erasing PEB 991, retry
[ 2.331727] ubi0 error: 0x8046a934: cannot erase PEB 991, error -5
[ 2.338132] CPU: 0 PID: 1 Comm: swapper Not tainted 5.10.138 #0