It’s not a merging process. If you’ve played on both systems unlinked, you will only have the progress from the account you choose to be the main one. Additionally, if you’ve purchased/earned stubs on both systems unlinked, you will only have the stubs from the account you choose as your main one.
On the bright side, any stubs you earn while linked will stay with your main account when unlinked. If you buy stubs while linked, you can use them from either console your playing on, but if you unlink, any unused (purchased) stubs will stay with the account you purchased them from.
As the previous poster mentioned, you don’t lose your stubs when linking. If you’ve found they’ve been diminished, it’s because they are tied to the sub-account and you just don’t have access to them. When you unlink, they will be there.