Totally awesome question.... Good job! 🤣
You can replace a hub motor with an off the shelf version... But you'll more than likely have to replace the spokes (or the entire wheel as it may be cheaper) and controls along with the wiring.
The battery is also wear item and you might have the same...