Sharpshooter and Crossbow Expert effectively remove every penalty for ranged combat except the ability to use a shield and amount of ammunition you carry. You know this. Cover, distance, disadvantage in ranged combat all removed by the two feats. This makes them far more versatile combatants able to bring their damage to bear in almost any circumstance far faster than melee. It's even easier to use Stealth and surprise targets. So as you gain levels and pick up the two feats that are common to ranged builds, you eventually have no real disadvantages.
I do recognize that those feats remove most ranged penalties, but you missed the two major disadvantages that they do not address (and which was largely my original point). Full cover and concealment. Depending on the frequency that those are encountered (and I would argue that any campaign that uses realistic encounter ranges should also have plenty of cover and concealment available) ranged attacks will be better or worse off.
Melee often doesn't have to deal with these factors because one can often circumvent them much more easily at point-blank range than from hundreds of feet away. Crossbow Expert does allow an archer to fight at point blank range, but at that point you're just a slightly weaker melee character (because melee will have either better AC or bigger damage dice). Plus, if you're readying actions to shoot the enemies if they poke their head out from behind cover, you're advancing at half the speed of the melee.
If we're talking Stealth, I would argue that the rogue is king. Not only do they get abilities that virtually guarantee they'll never fail, but sneak attack is devastating when used in conjunction with surprise (particularly for an assassin). Whenever my rogue player solo'd (usually with an NPC henchman), the rogue tried to sneak up on everything (and typically succeeded). It was a slaughter. Ironically, it was an ambush of sorts (summoning trap) that got her in the end. But I will grant you that Stealth is nice for ranged attackers, since they don't have to get as close.
More damage when they actually hit. The few rounds the ranged attackers get while the melee closes more than makes up for the damage.
That's heavily situational. In a dungeon crawl, most encounters will occur at ranges where the melee will be able to close immediately.
If the enemy hides behind total cover while the melee closes, then the ranged can do nothing but move or wait.
Heck, I've played in campaigns (in multiple editions) where the average encounter distance was 30 feet. That DM felt that ranged attacks were too powerful, and so he started encounters at shorter distances to make them less so.
There was another DM where we'd spend 99% of our time in open plains (I guess he didn't like making up terrain). Ranged options were very strong in those games. A friend of mind played as a 3.5 halfling ranger with a riding dog in one of that DM's games, and he was basically an unstoppable killing machine.
One of the few advantages is definitely the girdle of giant strength. Though Hussar has me thinking of building a str-based ranged attacker. We deem ranged weapons to be any weapon with a range entry, not just listed on the ranged table.
I agree with that assessment.
Melee is definitely weaker. Having run a few parties, the nastiest thing you can run in 5E is a ranged heavy dex-based group with Stealth. You gain surprise against practically everything and destroy it before they even get a chance to attack. You can even have your mage take Stealth, so your entire party can slink along quietly through dungeons at slow movement. Hard to do with big, heavy armor martials that need to enter melee range. Have your mage luring monsters out with minor illusion or dancing lights. It's like a walk through the forest on a warm spring morning through most dungeons.
Even the mighty dragons I complain about with melee are child's play to a ranged heavy group. If the dragon sees a ranged party, it might as well run. If it is a caster variant, it should cast invisibility on itself and leave saying, "Humanoid bowmen and ranged attackers. I'm out of here. They can have my treasure. I can find more." That's the difference between a group of focused melee martials and a group of ranged attackers. I feel bad for dragons against ranged groups. They have no way to protect themselves other than the DM making them a caster variant. Archer has them hammered before they even close to breath weapon range.
You remember my player that made a melee martial in our first campaign? Last two characters were a warlock/fighter eldritch blast user and a ranger/rogue archer. He is the min-maxer of the group. He knows where the power is after playing a melee martial in the first campaign.
In your campaign I have no doubt that range is more potent than melee. I've said as much in previous posts.
It will certainly be more true in campaigns which feature lots of flying enemies than campaigns which don't. However, I've known a number of DMs who would rather a dragon have an in-your-face beat down with the PCs rather than spend its time timidly skirmishing. From your comments, I understand you to be one of them (you just don't consider 5e dragons tough enough to do so without modification). In that type of campaign, ranged doesn't have any great advantage over melee in a dragon fight.
I don't think ranged > melee is universally true of 5e. Certainly, the DM doesn't have to let it be true. It will depend on a lot of factors that vary from campaign to campaign. Average encounter distance. The abundance of cover (especially full) and concealment. Magic items. The frequency of flying enemies. Whether encounters have open boundaries or closed (dungeon vs wilderness).
You like to use realistic encounter distances. Perfectly valid choice. But are you putting in a realistic amount of cover (including total cover) and concealment for melee and enemies to utilize? I'm skeptical, because an enemy behind total cover means little to no DPR for the ranged attacker. If the enemy pops out of cover to shoot, they can take their full attack and duck back behind total cover, while the ranged PC can take a single readied attack in retaliation. If the ranged of both sides just hide behind total cover in a stand off, its the melee that will decide the battle.