Your stability was the issue, but not because the rocket was unstable. Rather, it was
overstable. When a rocket has a margin as large as yours, it has a tendency to cone, or spin around the nosecone. It appears to me in the flight that the aft end of the rocket was rotating wildly around a relatively stable nosecone.
Many fliers just worry about having the center of gravity at least a caliber forward of the center of pressure. You demonstrated that there is a limit at which it is too far forward. My L1 flight (a Giant Leap Crossbow with the dual deployment [read -- longer] kit) flew similarly, though not to the same extent. Adding a larger motor makes the problem worse, not better, especially if some of the motor's mass is also forward of the CP.
One of the things you could have done to salvage the squirrelly flight would be to use your electronics for drogue ejection as well. The lower altitude would not have bitten you in the butt like it did here. I know this is controversial, but I fly dual deployment with redundant electronics on every project (including my L1 and L2 certs) because I never trust motor eject. Give me a plugged motor any day.
Sorry to hear about the failed cert. Hope things weren't too badly damaged. And heck, if it's a total loss, you just have to build a new rocket. Dang!
