So, this is a modding idea, but could also apply for a base game concept.
The idea of this concept is to add in resupply modules which are parts that can be placed anywhere on the ship, and include a cache of some ammo, power or other form of materials. Resupply modules are fragile, expensive and heavy, which is why they can be detatched (simply use a death or damage trigger) from the ship once their cargo has been emptied, presumably into an appropriate storage deviced. When a resupply module is detatched it will be considered destroyed, and as such can be brought back using the repair function. Due to this, resupply modules will not be able to be deployed in battle to resupply, at least until the battle is over again.
An alternative method is to have resupply modules provide an indefinite supply of materials, but will automatically be detatched when in combat.
To further expand this concept, resupply modules would not transport raw materials, but would instead transport materials required for manufacturing materials. For example, a resupply module could bring in reactor rods, which would provide a reactor with so much production of batteries, or a resupply module could bring in ammo components needed to make ammunition in ammo factories.
Late game, players could build their own facilities to produce these items on their own ship in battle, or even better, transfer resources to other ships in their own fleet. This is, however, just an idea.