@martinbogo:
I found out that my power supply was fading down to 9.4V under load, and replaced it. The steppers are now running smoothly.
Thanks, I'll bear that in mind next time someone reports similar symptoms. If the power voltage falls below 9.4V then the firmware turns the stepper drivers off and an under-voltage event is recorded, because the stepper drivers shut down at a slightly lower voltage. You can tell that this has happened by running M122 and looking for "under voltage events" in the report.