Risk is probably minimal (though some pathogens can "hide" for more than a year- you could have an asymptomatic carrier), & some snakes may be stressed about this (stop eating) or get preoccupied with breeding. You'd think captive snakes would enjoy a change of scenery, but some do & others don't. If you're planning to breed these snakes, then sooner or later they're going to meet anyway. If the substrates are actually fresh, I'd be inclined to swap them also, so the new enclosure won't smell so different. (& wipe down- ie. disinfect- the enclosures before putting in the swapped substrate) Again- not risk-free, & your call- you'll be living with whatever comes of it.