rebuilding a reborn engine is not an easy job and road side mechanics will ruin it. if you want to rebuild then go to an expert mechanic otherwise you will loose time money and vehicle too. similarly, in the case of swap get it done from a true professional. swap is better and safe but totally depends on where do you source that new engine plus who is doing the swap.
cost of rebuilding complete and engine swap will be almost equal. the difference would be hardly of 10k.