Got it, thanks Thom. I realised that I could have optimised it to recurse fewer times, but at some point with increasingly complex surfaces it will run into a stack overflow again. I had a little read elsewhere and found that there are workarounds (ulimit and altering the interpreter, sounds like a bit of a dodgy hack to me..), but eventually it's always got an upper limit.
I very much like the idea of a Geometry walker traversing geometry, and ended up using a solution very similar to yours. Cheers!
-CJ