Advice on buying junkyard engines?

I've never bought a junkyard engine before. I actually need two engines, a 5.9L Magnum that will go in my '71 Dart, and a 4.2L V6 for a '97 Ford F-150 that blew up. While I expect to do a little freshening up on one, I don't want to need to do a full valve job, new rings and bearings, line boring the crank or cam bearings, etc. The goal is not to buy a $600 engine so I can sink $4000 more into it.

How do you avoid buying a piece of trash? I've seen these used engine and transmission wholesalers on Farcebook Marketplace and have no idea how good or bad they are. I also know some junk yards are pull your own, while others sell pre-pulled engines. I'm not adverse to paying a little more for an engine that's been compression and/or leak-down tested or comes with some kind of warranty. There are also some things that I'd consider to be obvious like not buying an engine with 200K on it, one from a car that had a hard front-end hit, little things like that.

I'm reasonably sure I don't want to go with a pull-it-yourself option, as I'd literally be doing it by myself. I'm not into crawling around in the dirt and mud to get it out, and having back issues doesn't help.

I'd love to hear other people's advice and experiences on buying from wholesalers and junkyards, and what you do to make sure you're not buying scrap metal.
Car-part.com. do a search for your engine and find a low mileage unit with a warranty.