So really, it would be best done in software, with the mapping done in software. That requires an altered rom for every game you may want to do it with, that includes the software mapping... which is a total PIA.
Just another reason the NES doesn't stand the test of time at all.
Well, each mapper doesn't have the same feature set anyways.
Some only page CHR-ROM, some only page PRG-ROM, some have multiple paged windows, etc.
Like I said, the obvious thing to do would be take a programmable logic array and just add a header to the ROM image to tell the array what it needs to be.
From there I see 2 directions to go...
The EASY thing to do would be to adapt a ROM auditing tool to append a flash cart header to the images. Just run your NES images through it once.
The SMART thing would be to include enough code for the cart to read UNIF headers(the older iNES headers aren't adequate for this task) and match them to corresponding game configurations in the logic array ROM.
This also makes it easier to load multiple ROM images, as you've already got a boot ROM handling your files, so you can just drop a menu into that.
I have to give the NES credit. It was designed for a very limited sort of game, and when the industry exploded in technological complexity shortly afterwards, they managed to keep it viable. Sure it was done with duct tape and prayer, but it worked.