Generally the unwritten rule is that if the vehicle is all stock and unmolested, then it’s stupid to do a swap as you’ll drop any intrinsic value from numbers matching etc. BUT if the car has been previously modified, or if it’s a model that’s quite common, then sure, go ahead and swap. The right candidate for a swap is going to be a good platform, but that is known to have problematic components. The 280Z in the example is a good candidate. They made a lot of them (but they’re becoming less common) and the original engine was not that powerful by modern standards, but in it’s era was more than powerful. The EFI is dated with it’s thermal-time and AFM issues.
Newer EFI makes a huge difference, even on the same L28. Megasquirt, or other aftermarket EFI fixes so many issues. But a full swap, such as my VQ35HR > 280Z swap more than doubles the horsepower while dropping nearly 500 lbs. It’s all still Nissan on the purists side and since they’d previously replaced my old L28, my #'s did not match. So, modding my 280Z was a positive theme and albeit improved my value over stock. Not to mention the 350Z seats are much more comfortable than stock. (heated too!)