Some cameras have an auto vibrate function that shakes dust off the sensor when you power the camera on or off. My main camera doesn't have that, but I'd definitely enable it if it did.
Anyway, these habits are simple enough, and have saved me a lot of post-processing and sensor cleaning hassle.
Tree mating season, with pollen in the air everywhere, is an especially precarious time to change lenses outdoors.