There’s no room in the enclosure for another board, but one could potentially grind out the wood under the palm rests to make space. Alternatively, a small hole drilled for communication wires or port to an external board may be simpler.
The Model 01 supports a standard USB power supply of 500 mA (it can use more if available, to brighten LEDs, for example—not sure what the safe upper limit is). Powerful boards tend to consume more power than USB delivers when running the chip at full speed along with the other electronics connected to the board, so you may need external power depending on how much you intend to do (but I think it’s theoretically possible for the keyboard to share its power— there appear to be contacts designed for an aftermarket power circuit).
Using the expansion pins alone, it should be possible to get two boards to communicate. We can write a lightweight protocol that lets the keyboard call heavier services on the external board by writing out one pin that the other board reads in. The powerful board performs the calculation and writes the result back to another pin. I thought about doing something like this with an UNO that I have collecting dust. This may also be a way to add Bluetooth connectivity to the Model 01.
An Arduino with some interpreter (I looked into Lua) might enable calling arbitrary, dynamic macros with no compilation needed.
For a more ambitious example, we can install the Arduino IDE on a Raspberry Pi, and grind out space for it in the enclosure. I’m not sure if we can communicate with the keyboard’s bootloader outside of the USB stack, but I imagine, one way or another, we could press a key on the keyboard that recompiles and flashes the firmware so we can completely change the keyboard configuration on-the-fly. The RPi with USB mass storage emulation could make it easy to mount the firmware source code on the computer it’s plugged into, but I’d rather set up a network so I can tell people that I’m “SSH-ing into my keyboard.”