A good way of examining it is to simply do the odds:
Assume 50% hit rate, 10 dps. Auto is 10shots/second 10 each. Railgun 1/second @ 100 each. If both have 100 HP, the railgun gets to make 2 or 3 shots before dying to the auto (Unless the auto lands every shot, which is ~1 in 1024.) 2 shots gives him 75% chance of winning. 3 gives him 87.5% chance. He'll get 3 shots if the auto has to make 21 attacks, or rolls even slightly worse than average. So the actual win rate is between 75% and 87.5%. About 81%.
So what if both targets have 200 HP instead? The railgun gets to make 4 shots most likely, giving it slightly less than 50% chance of winning. The chance it doesn't get to make at least 4 is pretty neglible (Auto needs to land 20 out of 30 shots. A 5 miss differential from average is still a longshot, 1 in 32, or ~3%.) So we'll call the railgun at ~45% chance to end things after 3 seconds (when it gets it's 4th shot, and the auto gets it's 31st) in victory.
The auto has a little under 50% chance of hitting at least 20 times after 40 shots. The other outcomes that make up the other >50% are that it hits under 20 times. So just before 4 seconds are up, when the railgun is about to make it's second shot, the auto has a ~45% also of winning. But this is lowered further by the 45% chance it already lost. So it actually has about a 45% of 45% or ~20% chance of winning.
So so far, at 3.99 seconds, we have 45% chance the railgun has won, and a 20% chance the auto has won. 35% chance of outcomes left. At 4 seconds, the rail gets it's 5th shot, and if it lands (50%) and it has already landed at least one shot (87.5%) it wins right here. So 50% of 87.5% = 43.25% chance the fight ends. 43.25% of the remaining ~35% outcomes = ~15% added to the overall chance rail wins. So rail is up to 60% win rate. The chances of the railgun getting to make a 6th shot are really slim (auto has to hit less than 20 times out of 50 shots, so only slightly higher than the chance it doesn't even get to make 4 shots) so I won't do the actual math there. Call it another 1%.
TLDR: Vs a 100 hp target with 50% accuracy on weapons, railgun wins 81% of the time. Vs a 200 hp target, railgun still wins ~61% of the time.