I think you did a great job because you didn't fall. I have fallen millions of times on steep hills, trying to unclip
Now if I ride unfamiliar steep climbs and I am not sure whether I would make it even in the lowest gear, I unclip one foot in advance. I know it's not correct and I lose power but I fear falling on one side. It's not painful but it hurts the ego. Still, I don't recommend doing this.