In-house roles are more similar to every other job - i.e vaccancies will come onto the market (often with recruiters), and although places will possibly have vaccancies on their own websites, you'll have to know where it is.
One thing to note is that you could easily do a computer science degree and convert to law - it's very much about getting a degree, rather than what it's in (to a certain extent, and certainly encompassing computer science). With all the (in my view, overhyped) chatter about lawtech, I can't see it being seen badly.
Work-life balance is going to be difficult to determine for either of those. Certainly the lower down you go the more likely you are to get a better balance, but not always, and it will still be very very changeable. The main thing with law isn't necessarily just the work-life balance, but also the unpredictability of it. I don't know if various coding jobs are better for that.
The only other thing I can think of is that solicitors are client facing, so in terms of having emotional energy left at the end of the day to write a book, it may be more draining. But who knows; it may also give you some good plot points.