To be honest I've not much more idea than yourself with this, I hope you're not overestimating my electronics abilities...
It sounds like the controller may be reacting to some kind of voltage excursion (maybe over/under voltage) or possibly a hardware issue with battery/controller/bms.
I think I'd start by bypassing the bms and running directly from the battery, to rule out a bms issue.
If it's still playing up maybe ride with a voltmeter connected to the battery to get some idea what the battery voltage is doing when it fails.
Also remember that you're operating the LM317 at it's upper limit, could this be overheating and going into thermal shutdown? Maybe increase R63 still further to reduce it's input voltage a bit further.
If all else fails, try it with your new controller when it arrives to rule out a controller issue. That's all I can think of at the moment, if anything else pops into my head I'll post it up.