Did this recently for all pokemon games.
Setup is: 2x Switches (1 is CFW the other is a clean OFW OLED)
Code:
-> I transferred my save data of Pokemon Scarlet from my non-hacked OFW OLED Switch to my OFW booted (hacked) Switch.
-> Then I booted into sysCFW+Incognito and used JKSV to make save data/back up (Remember to use the photo album to access the homebrew apps).
-> Afterwards I turned my hacked Switch off and connected my hacked Switch SSD on my PC.
-> The next step to was copy the whole folder of my save file to another location as a backup.
-> Then I copied it again and edited that copy in PKHeX. After that, I exported the edited file to the 2nd copy of main and replaced it. The replaced copy then was added into the save folder on my SD card of my hacked switch.
-> I booted into sysCFW+Incognito restored the save file via JKSV and then booted into OFW.
-> I used the regular data transfer method to get my edited save file from a hacked to a non hacked switch: press + on the games icon (both consoles):
-> select data management and transferred the edited save file from stock sys (hacked console) to my non hacked one.
-> I tested the game and went online with my non hacked switch. I joined a random raid and everything works fine. my edits also came through.
If anything happens in the future I will share with you, but so far so good!