Some sort of homebrew application should be possible, you open the homebrew app, then from there you select the DS game of your choice, and start playing.
it creates a folder on your SD card, with an image of each frame recorded.
from there, you just need a program like image ready to import the folder as a gif
Sure, there's no sound, the folder would have hundreds and thousands of frames, but you could atleast get high quality screenshots and recordings yourself