I wouldn't think so... too many unknowns.
There are always hidden costs in an engine rebuild. Trust me, I know. I've rebuilt an S54 twice.
From my experience, you're going to have so many small issues and other shit after the rebuild anyway. It's not as easy as just rebuilding.
Buying another engine and slapping in it is easier. Rebuilding means you need to find a shop you trust, a shop that will not just take your money and run as soon as the rebuild starts showing signs of not being built correctly. You need a shop that has a good track record of building these engines before, and usually, that comes at a price.
There are some great success stories of guys building awesome engine rebuilds, but all of those stories have one thing in common. Lots of money went into the rebuild. If someone says they can rebuild your engine for a fraction of the cost a big well known engine shop will, walk away. You're going to get an engine build that will be missing gaskets and bolts. Trust me.