A phone basically consists of a bunch of circuitry bonded to the motherboard, a battery, some peripherals (display, speaker, mic, etc), a bunch of antennae and a casing to hold it all together. It's not like a desktop PC where the motherboard, storage, RAM, power supply, possibly graphics card or even the sound card or network adapter might be separate, in one of these devices all of that stuff is bonded to the motherboard as a single unit, so replacing the motherboard means replacing the lot. And you'd have to replace it with one that is physically compatible with the phone (they are not standardised), whose charging circuits were compatible with your battery (big safety issue if not), and then it would need to be loaded with firmware that's compatible with your peripherals (no downloading of drivers, no BIOS to provide a minimal compatibility to let you set stuff up). Frankly it's unlikely that you could replace it with anything other than another JP-5 motherboard, and that wouldn't help you at all.
Replacing the CPU is even less of an option: the SoC (system on a chip, of which the cpu is only one part) is bonded to the motherboard and not designed to be removed: a specialist could rework the board this way, but it would probably be cheaper to buy another phone. And it's not even the thing you want to replace: you want to replace the operating system, which resides in the storage chip rather than the SoC, so what you actually want to do is to reload the contents of that chip - which JPay have specifically worked to prevent you doing.
In terms of modifying Android software, the important thing to know is that there is no generic Android build that can be downloaded and installed on any device. The software has to be adapted and built for the particular model of phone or tablet. For some devices there are some parts of this (the "Android ROM") that people build custom versions of ("custom ROMs"), but those are also device-specific. I don't rate your chances of finding an alternative ROM for the JP5 (this is a common question, and there doesn't seem to be an answer), and JPay have locked the device software down to prevent you replacing this anyway.