I mean, the most simplest way to prevent getting caught is leaving no tracks behind. E.g. you should have three men (should be enough, in my opinion), and then set a trap for the stage coach. As soon as the coach triggers the trap, kill everyone -> no witnesses, no penalty, nobody knows you (and you get extremely fast rich...).
Most stage coach robberies were never solved. The Wild West was - to be redundant - a wild, lawless place, so this is no surprise. Many robberies were simply not pursued because lawmen weren't sufficiently funded, many had to use their own funds to round up a limited posse, or more often, simply posted a reward which is usually funded from a portion of the recovered treasure.
Since it was very likely that you could get away with stage coach robbery, why up the ante by committing murder, when it doesn't increase your payday? Robbers were typically sentenced 5-15 years, whereas first-degree murder was a capital offense. Committing more serious crimes will simply attract more attention from the law and bounty hunters.
For one, killing people goes against people's conscience; people don't typically kill just for the sake of it. The witness is stranded on the road side and all he can say is he saw someone in a mask.
Two, you don't bite the hand that feeds you; if you kill the rich, you will deter the rich from travelling in the future. If they are a little out of pocket they may see it more as an inconvenience than a threat.