The GBA macro thing is more something that is done for things with a GBA slot.
Here you would be limited to the 3ds GBA emulators if you can persuade them and all the relevant things to always boot on the bottom screen, or stuffing an enhanced DS slot flash cart into it and using its onboard GBA emulator. Neither are ideal, and the latter is quite an expensive way to set about this.
If you wanted to get a bit silly you could see about taking just the controller inputs from said 2ds (either chopping down the board or making your own*) and sending those into a DS/DS lite or GBA guts you crammed into the 2ds. Screen wise the easier method would probably be to keep the screen from whatever you cannibalised (maybe with a switch in the case of the DS) and block out any smaller parts. For serious internet big boy hacker points you could possibly make an adapter, or source a screen that fills the gap and responds to the outputs.
*could even get really fancy and do microswitches but the world might not be ready for such glory.
For the basic stuff I don't know what, if any, "is part present?" detection the 2ds xl has though. Usually it is just a matter of sticking a suitable resistor across the relevant pins though -- I would not expect some kind of handshake to have to happen here.