Ritchie opened the scoring in the 12th minute with a 25-yard shot which flew into the top corner of Shwan Jalal's net.
Gary Roberts set up the second after 25 minutes with a centre from the left which found Andy Williams unmarked to head home.
Ritchie made the game safe for rampant Swindon in the 67th minute with a strike which flew over a defensive wall past the goalkeeper.
And Adam Rooney scored his first goal for Swindon in the 85th minute after Roberts had drilled in a centre from the left.
Swindon might have got more as Bournemouth collapsed, with Williams hitting the post and bar in the second half.