Same here, glad you kept it upright.
Sounds like you did a good job swerving.
That's why I wear steel toed lace up boots.
I have done something similar twice on both feet. Both times on curves. Messed up the toes on my boots and the last one was a doosie, I was a foot off the pavement on the dirt shoulder. I used my foot by instinct. Not sure it was the best thing to do but when you are into it you don't have a lot of time to plan your moves. It did tweak my ankle a bit but like you, but I kept the bike upright. I have slowed down a bit and am practicing my lines on curves. I was too far off the centerline when I was making a sweeping left turn and I needed extra space to keep from sliding out. I was following a buddy of mine and he's been riding for many many years. The first time there was a bunch of sand and water on the pavement from a recent rain. My foot acted as more of an outrigger.
Some guys say using a foot is a good thing, while others say it is not. I guess it all depends on the situation.
I think a helmet is a good idea (we are required to wear one here), and I always wear kevlar lined jeans, gloves, and a long sleeved shirt if it's real hot, otherwise I always wear my padded jacket. You never know what's ahead, so remember what they said in Boy Scouts, Be Prepared! and practice, practice, practice.
When I find myself drifting off to other thoughts I make myself think about riding the bike. You can't really think about other stuff while riding like you can driving your cage.
There's nothing better than riding a bike but like they say, it's a full time job watching the road and anticipating what others might do in front of you.