The main problem NQ has been having with "Merging" is that when the ships are together, which ship has the full control? and how the rdms will function, along with LUA scripting for the different thruster variations that would come with a "merge"
There are a few ways you can go about this.
For ship docking for example, you could have a priority system that automatically shuts down flight controls for every connected ship or fragment that isn't the mothership of the fleet (for a larger ship and smaller docked ships). In Starmade that is by default how docking works, and in Space Engineers a docked ship can use thrusters to violently un-dock (does not recommend).
In the case OP is describing here, the detachable components don't actually appear to be fully functional ships. OP is talking about un-powered connected containers that can be disconnected to reduce the ship's mass (to improve thrust). As long as the containers don't have thrust or any component system, there is no battle for control: only the ship has any claim to control there, so there should be no conflict between the docked parts and the main ship.
It'll all come down to a few mechanics as to whether or not it'll be possible. Depending on how they set up landing a ship onto another ship, you might be able to create container "ships" that land onto your barge (if landing gears are magnetic and can lock). The troulbe is without any controls on the container "ships", you can't actually tell them to un-dock from the barge.
On the flip side if you can use landing gears on the barge to connect to a container ship or ships, you might be able to tow them. This could be a problem too, as ships that have landed might lose their flight functions, so "landing" onto a cargo unit to tow it might shut down the barge and prevent takeoff.
Best case scenario would be the ability to destroy/delete/disconnect ship components mid-flight, even if the only way to restore the disconnected parts would be to "repair/restore" the ship (basically to replace the detached components). A break-away block (like the rotors and connectors in Space Engineers, or docking components in Starmade) that you can control from the barge that would allow you to purge everything connected to it would be the way to go. You could even probably set up a script to automatically disconnect the cargo bay if your shields drop for example.
If there is no such block at launch, a clunky but possible solution would be to set up an explosive charge in-between the cargo unit and the barge that would destroy the hull connecting the two, but not damage key systems, thus relieving you of all of the mass of the cargo when detonated. We don't know yet if damaged hull actually disappears, nor do we know if you can "cut" portions of a ship off as a result of damage. The devs mentioned damage to constructs warping/damaging voxels, however we don't know if that can actually cause systems to break off of a ship (of if the whole ship would "explode" before that type of damage would occur). So that might not be possible at all.
We can expect AT SOME POINT in the future for there to be some kind of connector block that would make this possible, but if the above two solutions aren't present at launch, you might just have to go down with your ship.