>>54410753I've actually been doing this recently, so I can help you out with it. I'll also get into what you can do with flash carts, and transferring to/from spinoffs (Colosseum/XD/BR, and all the way up to Pokemon Bank).
For gen 3, you can transfer your save games to original cartridges using either a cartridge dumper, or DS homebrew using a DS flash cart (look up GBA backup tool, and cartridges are only about 10 bucks). Alternatively if you don't want to bother with original cartridges, an EZFlash Omega DE can do anything you wish using the link cable (Colosseum/XD, pal park, etc.)
For gen 4/5, you can use DSaveManager (3DS homebrew) to transfer your save data to official carts. Flash carts are pretty much useless for anything other than just playing the games. Can't connect to battle revolution/ranch/Pokewalker, and can't transfer from gen 4->5 or 5->Bank.
However, if you have a hacked 3DS (which you honestly should), you can use Twilightmenu to transfer your pokemon from gen 5 to pokemon bank.
Then with then 6+ you can just use regular 3DS/Switch homebrew to edit/restore your save files.
As a quick bonus, you can move your save data from gen 1/2 (either emulated or on cartridge) to the 3DS virtual console, then to pokemon bank. Though that's a much more involved process that I don't feel like writing up here, but it's easy to find if you look it up.