Some good lessons have been shared by the OP. I'd add:
1) When clearing/recovering regulators, use your tongue as a splash guard and assume that you might not have cleared it fully. Anticipating some residual water, means you will inhale slowly and cautiously. This is (should be) taught on the Open Water course. Many divers graduate from OW training and are very forward focused - rushing towards AOW and specialty training - invariably to the detriment of their core skills. Progress your skills only when your existing skill set is ingrained and polished. Don't overlook those 'little things' your instructor demonstrated in the pool... they're often the most invaluable and critical things you'll ever learn....as the OP's experience demonstrates. A skillful diver isn't the guy with the most badges and plastic cards.... he's the guy who can remember and apply with precision everything he was shown in his entry-level training.
2) Every diver carries an Alternate Air Source. It's not just for your buddy. If you experience a problem with your primary regulator - switch to your own AAS. Regulators do get cracked, diaphragms tear, exhaust valves mislocate, mouthpieces fall off... you have an alternate air source on your person... remember to use it. Want to make sure you'll remember - PRACTICE. Then practice some more. And some more.
3) Faults and issues can happen at any time. Unless psychic, you won't be able to predict them. If you can predict them, don't ignore them. If you've trained to rely upon the buddy system as a final safeguard when diving, then you need to ensure that you are applying the buddy system. If your buddy is too far away, or too unobservant, for your liking - then do something about it. Signal "I have a problem.. come closer...stay close". Don't be shy about addressing safety issues.
4) If it feels like a cluster-$%&* underwater, then it probably is a cluster-$%&*. Get out of there! Things go wrong when chaos reigns. It doesn't matter whether it's a training course or a fun dive... if it feels bad.... act on your instincts and end the dive. Like an over-scripted plot from a corny horror movie... so many divers involved in incidents can be heard to say "I could see it going wrong, BUT.....".
5) Until otherwise reassured.... assume that a dive 'pro' is a liability. Let them earn your trust. Until that time, look after yourself. Even after that time.. look after yourself. Anyone can have a bad day... Don't be reliant on anyone, except yourself.