Update: I tried updating/reinstalling the firmware, hoping it would work. The firmware update was successful but after it was done, I rebooted the drone and the gimbal still did the crazy dance, so no chance.
I inspected the flat ribbon cable up close and saw a little dent in the cable, perhaps...