I'm just revisiting this thread in case the eventual outcome is helpful for others.
While it looked like fitting a new controller had resolved the issue, it turned out that it hadn't.
After much investigation, I finally determined that the problem was an intermittent connection at one of the battery terminals, exacerbated by vibrations while riding.
The fix was simply to bend out slightly one of the metal terminals within the battery, to ensure a solid connection. No problems at all since.
While it looked like fitting a new controller had resolved the issue, it turned out that it hadn't.
After much investigation, I finally determined that the problem was an intermittent connection at one of the battery terminals, exacerbated by vibrations while riding.
The fix was simply to bend out slightly one of the metal terminals within the battery, to ensure a solid connection. No problems at all since.