we call this downscaling btw, depending on downscaling algorithm used then a higher resolution image downscaled could be higher quality than an image that was produced at that resolution directly
I don't see a reason why it couldnt theoretically be done, as long as the replacement hardware was able to talk to the console the same way as the original camera does, and that the console is able to power it, it should just work?
you'd need to know quite a bit about how the hardware works though. it's unlikely the 3ds could communicate correctly by default with a different camera hardware. you would probably need to have some additional hardware in between to do the translation between camera and 3ds, so that the 3ds receives data in the correct format it expects and the camera receives control commands in the correct format it expects
then in theory you could take a 1920x1080 picture (example) with the higher resolution camera, translation hardware downscales this to 400x240 using whatever downscaling algorithm you want, and sends that to the console in the correct format it expects. but one potential problem is that the "translator" needs to be performant enough to be able to do this conversion in real time, otherwise you would have a delay between what the camera sees, and what the console shows on screen. but maybe you dont care about a delay.
another potential problem is that your new camera hardware might need more power to run than the current cameras do, you would need to account for that and figure out a way to power the cameras adequately. otherwise also find a way to properly mount the camera onto the system, but that's the easy part I think. at worst you just need a different design for the top shell
but none of this matters if you don't understand how the hardware (and software) works... it simply isn't going to happen unless you understand how it works, how to program for it, and how to make the hardware for it
if you're serious then 3dbrew might be a good starting point:
https://www.3dbrew.org/wiki/Camera_Services
your "translator" needs to understand how the 3ds communicates with the camera hardware, and it needs to understand how the camera hardware is expected to respond back. if you wouldnt know how to design custom hardware then maybe some kind of arduino could do it, but it wouldnt be the most space-efficient solution (and it might consume more power than a dedicated board would)
it goes without saying that the images you get from this will be blurrier, because at 400x240 there arent enough pixels, you trade detail in exchange for smoothed out edges. you know this already and you dont mind considering that you find the pictures to look better when taken from a different camera and downscaled, but it needs to be mentioned anyway. it's not going to be a miracle solution where you get super sharp high quality images on a low resolution like this