If your DM allows you to hide every turn with cunning action the light/hand crossbow rogue works very well. If not then you only option to maintain decent damage output past level 5 is melee and dual wielding.
I'm trying to figure out how this works.
The difference between Rapier and a Crossbow depends on a few things.
You can't dual-wield a Rapier and a shortsword (Dual with no feats requires both weapons be light). So, ignoring feat selection it is a d8 sword vs a d10 heavy crossbow.
Otherwise it is shortswords, which are d6's, and do not get the mod damage to the off-hand.
Let's say you grab Dual-Wielding, You've d8's off-hand doesn't get mod damage, but hey, +1 AC is cool.
Crossbow guy can grab sharp-shooter, or crossbow expert and switch to hand crossbows for two attacks, both with mod.
Dual-wielding is done now with it's path, unless you multi-class, and the Crossbow rogue can also multi-class for improved accuracy and can still take the other feat he didn't grab.
Honestly, unless you're playing with the optional flanking rules I don't see how the ranged rogue falls far behind, especially since the sneak attack stays the same and is probably the majority of the rogue's damage anyways. Both of them are getting +3d6 damage and the difference between their weapons is relatively minor as far as I can tell. Maybe 1 or 2 points of damage on average