Not a lot to add other than "it happens". Learn from the event, think it through, work out where things didnt work, what can be improved and try to prevent it happening next time.
As others have said, learn where your dumps are (ALL of them) and learn to tell immediately if you're moving vertically in the water (ears, visual reference, gauge etc).
Also worth noting that your position will affect air dumping - air will always move to the highest point so if you're dumping from a valve that isnt the highest point, nothing will happen so you need to know which dump to use and where (and alter body angle if needed).
You mentioned suit expansion and yes that can speed up an ascent.
Another issue maybe were you overweighted? If so you'd have more air in the BC so expansion would be quicker and more pronounced than normal so its worth checking that.
If the worst comes to the worst and you know you're destined for the surface remember to breathe out forcefully all the way. Also go into the flare position to create drag to slow the descent (a combination of this flare and dumping can occasionally stop a seemingly out of control ascent).
If it makes you feel better i just did my first dive of the year with a brand new drysuit and had must first ever out of control ascent. As we all had new kit and months out of practice we decided a shallow warm up dive so no deeper than 20m (~60ft).
A shoulder dump instead of my old suit with a cuff dump that decided no matter what i did wouldnt dump air. It was find below about 30ft but above that i was going up and couldnt dump, had to hold onto rocks until i got to about 20ft then, no more rocks, had to let go and ascend. Decided not to grab my buddy as it isnt really his problem
Ascent wasnt too fast or too steep but im still annoyed i let it happen.
My shoulder dump is being replaced immediately by a cuff dump as i cant trust a valve that MIGHT not dump when i have stops to do. Again, a learning experience.
Other highlights from that dive, got my reg kicked out, mask kicked off and snapped the zip to my BC pocket leaving it fully locked closed and cant repair.
Not bad for 36 mins work