I then take it that you personally are patching the kernel, wireless, and application software for all the known security problems since their release.
I'd be surprised if many users with 4 MB devices have the knowledge or skills to do so.
I can't recommend anything except 18.06.1 and later for any router. With good-quality replacement devices for devices from the era of 4 MB flash available for US$20 or less, the inability of many of those ancient or under-spec-ed devices to support 802.11n or later (which drags down the entire wireless network), and the inability to secure those devices adequately for most any purpose, and the amount of time it would take to custom build a secure, functional image taken into account, say it's time to upgrade.
To what supported Linux kernel that is present in those ancient releases?
Also, unless you've got chips that support current 802.11 protocols and security, you're still left with an insecure wireless network that draws down performance as it can't operate in standards-compliant 802.11n mode.
actually, now i'm thinking that i may be better releasing a new kernel for various ARM, MIPS & obviously i586+ Arches which will essentially offer *NIX community another choice
chips can be salvaged from non-working hw and donated to working hw
I'm frightened that you're quite serious...so I wanted to be clear (technically)...
Physically, this is likely impossible, difficult, or would require many, various: shims, risers and adapters
This would then result in your requirement to make a custom firmware for each individual device, based on the chip combinations you used
You'd likely have to re-fit antennas in the device
If you're in the US, this modification violates your authorization to use the radio under Part 15 of the FCC rules, and you would be using an illegal transmitter under definition (by my common understanding) of the Communications Act...and most nations