I did really like the idea of #PICTIL. So I did some research on this and on this page I will just summarize ideas. (mostly because all this in a comment would be to much I think).
First the idea of using the PIC16F527 which @Yann Guidon / YGDES suggested. Is a very good choice. In my test design I used every pin of this micro controller and its quite cheap (sub 1$) . With these tiny LEDs (0201!!!) you could built something like this:
This would be an Pin and size compatible replacement. the small SMD parts are the LEDs the bigger ones resistors (0402). an you can also see the PIC (TQFP-20).
So it is posibble to make this but the routing is not ready yet. Maybe I will finish it, but i do not know. If I would finish the PCB I would have the next probllem with soldering these LEDs. And so far I do have no experience with programming PICs.
some additional links/data sheets:
original project by @Yann Guidon / YGDES: #PICTIL
Datshett TIL311: http://www.ti.com/lit/ds/symlink/til311.pdf
Datasheet PIC16F527: http://ww1.microchip.com/downloads/en/DeviceDoc/41652A.pdf