I've actually thought extesnively on the subject before (Why? No clue. Cuz I'm insane probably) and I think I can solve some of its problems...
For one, the whole allies in the merc camp thing is easy. Say we have 20 mercs. 10 are independent, 10 are "official", 5 work for the Red team, 5 work for the Blue team. That should handle our "friends within the mercs" problem.
Give mercs a level up system similar to Red Dead Redemption: Equipment acquired in-mission disappear after mission. Equipment can be purchased off mission using XP. XP is gained by completing missions and by killing other mercs.
Independent mercs get more experience per mission than official mercs do, BUT official mercs get a huge amount of experience if their army wins.
Griefers can be mildly dealt with using a nice little system Demon's Souls used: grade. At the end of each mission, the commander grades the merc A-F (or S-F if you like the japanese system). Mercs don't see what grade they got until the end of the game. The grade is visible to all commanders before they hire a merc AND the grade affects they XP gain (so if your average grade is S you get 1.5 times XP, if the average is F you get .5).
Independent mercs are invisible to commanders unless units have line of sight (not RTS line of sight, more like Splinter Cell line of sight). Give mercs a wide variety of skills and equipment, including scouting, stealth, sabotage, so on so forth. Part of the commanders job would be having ways to detect infiltrators (motion detectors, thermal detectors, guards, alarms, dogs) while the merc has to upgrade his suit accordingly to offset them.
A merc can propose a job to a commander just as well as the opposite. So someone could go to Blue's base, take pictures of the place and offer to sell them to Red commander, for example.
There's a million ways this could go...