My guess for the cost of that engine with the part number you listed is somewhere around $10,000. I can tell you last spring a friend of mine lost the engine in his 05 F-250. It cost him $6,000 for a used take out from a wrecked 2007 and another $4,000 in labor. The shop couldn't tell what caused the damage but the block was well ventilated and he was at 112,000 miles, so his warranty was already expired. The truck was never run with a programmer but I don't think the maintenance was ever a top priority either.
Hope this helps.