as Wimmy said it is possible, but its a hell of alot of work to do. you will be best of with a rear ended hgt rather than just buying bits, and you can never be 100% certain how the engine is from a crashed car.
you will need the engine, box, wireing loom, ecu, shocks, hubs, breaks, poss fuel pump, rad and pipeing, plus you will be best to do a cambelt change and service the engine before it goes in, and you still wont know if its spot on or not
plus the 5 pot engine isnt the easiest to do a swap with, even into another 5 pot vehicle
you can but decent hgts now from a grand, it will cost you more than that to do the swap with the new bits n pieces and labour easily
ANdy_sx