PKHeX is now able to edit parts of the save, known as save blocks. It allows users to export and import various save blocks.
Here's a tutorial on how to get it done. Steps
0. Keep a safe backup of your unedited save, somewhere on your computer. We're not liable if this results in a corrupted save.
1. Make sure you redownloaded and use the latest PKHeX. (Initial version with this feature caused corruption. Additionally, older copies do not have the feature)
2. Load the target save