It does happen and there are a variety of other reasons why you can end up on a different plane than you intended. You can improve your odds of avoiding specific airframe(s) by not booking them but you mostly can't guarantee it.
(Sort of. If you want to be sure to avoid regional jets on trans-oceanic flights you're pretty safe.)
(Sort of. If you want to be sure to avoid regional jets on trans-oceanic flights you're pretty safe.)