To answer the question directly: difficult fights are balanced around the player using their superior human judgement to have an outsized impact on the battle. This actually starts on the campaign layer, with players having more optimized fleet compositions and ship loadouts compared to the autofit grab-bags fielded by the AI, such that your ships are pound-for-pound superior to the enemy. In the battle itself, you have a better ability to see the 'big picture'. The AI has pretty sound tactical judgment in terms of engagements between individual ships, but it doesn't do more advanced strategic planning like "avoid their anchor ship until we've cleared out its support, then converge when it's exposed" or "aggressively hunt down their carriers while keeping their main line engaged". On the level of piloting the flagship itself, the human is generally better at making risk assessments that allows you to make decisive actions that an AI pilot would be afraid of (or misjudge and die attempting). A well-positioned human ship is
enormously more powerful than the same vessel in AI hands.
All this is just comes from decision making. If you're an arcade keyboard maestro there are some ships that let you do hilarious things on top of all this, but you can still beat the game comfortably sitting in a giant brick of guns and putting it in the right spot.
I've never understood why anyone would go AFK during battles in this game. They're the main selling point. They're almost universally the top reason people like the game. Tricking out an awesome flagship is one of the biggest goals of my fleet development. Taking it into battle to shred my foes is the second.
To be fair, I have found that the AI can make better use of multiple turrets and gun groupings than I can on larger vessels, if I'm piloting a capital I'll take control to get it into position and to take out key targets but otherwise I'll let autopilot take over and let the AI autofire for me.
There are indeed some mechanical limits to human interface that the AI isn't restricted by. You can only directly control a single weapon group, and you probably can't manage an omni-shield at the same time. Thus, more complicated ships will typically require delegating some tasks to the AI even when being flown by the player, but you can give the AI some guidance. Autofiring guns will prioritize your selected target. Normally I use this to make sure everything is focusing my primary target, but you can also do something like target a frigate attempting to flank you so that your secondary batteries ward it off while you continue to engage your main target with the big guns, or give the AI full control of the weapons while you manage the shields if you're being pressured from multiple directions. Pressing CTRL+[Number] will toggle autofire for the corresponding weapon group, which you can use to manage flux levels if you have your groups set up to facilitate it (ie turning off your HE / Ion weapons while you're trying to break shields).