Found something to try, should have thought of it myself.
Put the phone in bootloader and flash the stock ROM. Something in the flashed ROM is either conflicting, or the memory issues were due to an overfilled ROM in the first flash. If that doesn't fix it, it may be hardware issues and it's now a brick.
__________________
Former Windows Mobile enthusiast and developer, now a modder working on Android. I still have my PPC 6700 and HTC Touch, but I'm rocking a OnePlus 7 Pro