It's not like you'd type it all in by hand. Running an emacs keyboard macro over the function names will generate the code just fine.
That said, one possibility would be that you graft this code onto the current libgraphics as an optional mode (to be switched to by command-line), then ask Toady to include it in DF proper. There's a pretty good chance he'd accept, I think. It'd probably be a good idea to let me vet it first, though.
To do this as simply as possible, what you ought to do is hook the code between render(setup) and render(complete), skipping the latter entirely; have render(setup) finish off by sending the render data (in partial-print mode!) over to whatever device you're using; that ought to be about sixty bytes per frame, on average, if you don't scroll. Passing it through zlib would help for the larger frames.
Meanwhile, input from the device can be passed off at the SDL event level; don't even think about trying to descramble the input system beyond that. Simple is best. Although, be careful: SDL allows you to construct synthetic events, yes, but don't. For one thing that's a limited buffer that you can easily overrun (causing events to drop), but more importantly, this kind of server ought to have no SDL use at all. There's no need.
Oh, and since going below 80x25 is exceedingly unlikely at the moment, may I suggest you try to replicate the viewport-zoom mechanism currently in used? Eg. just show part of it at a time. This would, of course, work best on an iphone where it's easy to scroll, but I'm sure you can figure something out.