Tom documented his spec racer Boxster on here for years:
https://986forum.com/forums/boxster-racing-forum/46070-spec-boxster-build.html
He replaced the engine a few times and considered the engine to be a consumable part like brake pads and tires (though hopefully with a longer interval).
I recommend checking it for obvious flaws first. If it is good, do the basic engine out maintenance before installing it. Depending on budget and expectation of how long the engine will survive with heavy track use, I probably wouldn't replace the IMS bearing or do an in depth rebuild. If you want a 'bullet proof' engine it's going to cost a lot of money and still may fail unexpectedly.
I have a $2,000 engine in my rallycross car now. I replaced RMS, coils, spark plugs, spark plug tubes, AOS, water pump, and engine mount. Probably should have done the cam chain pads too while I had it out, but didn't take the time. I drive the car hard and don't worry. If I kill it, I'll spend another $2,500 for that consumable item.
*If affordable replacement engines are hard to come by where you are at, then that may be a different story. I can still buy
faulty, but complete 986 Boxsters for under $3,000.
Note: The this post is about an engine for a
track/race car. My views about car primarily for street use are different.