Honestly Valve should probably do some sort of rework to the melee weapons. One thing I've been thinking of is giving the default melees give you a small speed boost while deployed (maybe 10-15% max) and not have the speed boost on any of the non default melees (aside from some stuff like the GRU or Eyelander after it gets heads) as a way to balance their extra abilities compared to stock. The only issue is the Spy and Engie who are going to have their melees out way more often than other classes so I don't know what you would do about them or if they make the idea completely nonviable.
Really this is just a problem with TF2's original design decisions being incompatible with the design decisions they chose to make after launch to keep it supported.
Pre-unlocks, characters were built around their primary (not literally their 1st slot weapon, but their "main weapon" in the case of Engineer, Spy, Medic) and the other 2 weapon slots were basically boring filler weapons that you'd use in a last ditch situation. The only real exception to this is Demoman where they talk about in the dev commentary that Demoman (even tho stickies is technically his primary) is intended to weave both together at the right situations.
Essentially, the stock classes are for the most part one dimensional, they have super apparent strengths/weaknesses and do those things really well/badly and that's about it, and those strengths/weaknesses largely come due to HP/speed/a single weapon.
The reason that this is incompatible with the idea of "sidegrades" is pretty obvious:
You're balancing these unlocks around generic weapons that honestly aren't even that great most of the time. This means the "sidegrade" has to either be equally bad/boring or else it will generally be better, and neither of these are very ideal, but when it comes to making the game fun Valve (rightfully I'd argue) leans on the latter. We don't need unlocks as boring as stock melee, but in turn basically 99% of the melee unlocks in the game for non-Engineer/Demoman/Spy (who are all melee special) are better than their stock and diversify the class out.
Going beyond melee, take something like Scout's secondary slot, which is a
really good example of how sidegrades are difficult for boring base items.
The Pistol -
while not awful in the hands of someone really REALLY good at it - isn't a very compelling weapon. It's mainly a finisher/pressure weapon. That's fine except - because of how the base classes were designed - the Scattergun is so good that every good Scout other than Quad just leans heavily on their Scattergun and doesn't need to overly rely on a Pistol especially with teamwork.
This makes every single other unlock on the slot more compelling, and with no weapon bans there is no compelling reason to actually use the Pistol other than the GC being down and being forced to use it or memes. The other weapons on the slot either provide great utility or just better impact than someone good with the Scattergun would get out of the Pistol. Mad Milk/Bonk/Crit Cola/PBPP especially are all way more impactful and game changing than the Pistol.
Likewise you can look at Engineer whose Pistol slot is much the same way, even the best case scenario where Pistol would be useful (offensive gunslinger Engineer) competitive Engineers still use Wrangler because Wrangled Minis are more impactful than the Pistol.
The main way around this would be making some of the unlocks built into the class to replace the generic weapons entirely (or creating new unlocks for that purpose), but this is difficult for Valve because people have Strange/Collectors/Unusual/etc copies of these generic weapons at this point which they traded/spent money on, it's the same reason why Valve can't readily delete an unlock either.
This is basically something a Team Fortress 3 would solve tbh.