Does abstaining from sexual activity or limiting ones activity to only one partner prevent, or at least greatly reduce, the risk of contracting a sexually transmitted disease? Yes, obviously, because they are sexually transmitted diseases.
Even if everyone were to be abstinent or monogamous there might still be some spread of some of these diseases by non sexual exchanges of bodily fluids such as medical blood contamination, sharing of needles during intravenous drug use. Widespread adoption of abstinence and monogamy would certainly greatly reduce the spread of these diseases.
I don't think there is any need to isolate sodomy in particular, it may increase the risk of infection to a degree but if one is either abstinent or in a monogamous relationship then the type of sexual activity indulged in shouldn't matter a dickie bird.
TTFN,
WK