Get to know your salvage dealer. If you're buying online from someone you don't know, ask for a vehicle VIN and run the numbers through carfax or the like. This is the information age, use it!
BTW, I've seen disassembled 3L engines with as much as 80,000 miles and they had very, very little machine work to do on them. If you get one with that many miles though, replace the timing chains, adjusters, slides, and oil pump for sure. My personal high cap was 50,000 and that engine had nothing more than a cylinder hone and a crank polish to be ready for reassembly.