yes and no. the labor is about the same for head gaskets and replacing a engine. if the current engine was overheated, don't bother attempting any repair, just replace the engine. if the head gaskets leak oil and the engine otherwise is sound, it may be worth head gaskets. either choice will ultimately get very close in total dollars of the car's value, may even exceed what the car is worth.
Im a firm believer that these cars seem to nickle and dime you to death I was in my car 8k last year fixing around the motor. So I found a motor out of Texas with a year warranty all total with parts and labor I spent about 4k my car runs great and I believe its the way to go if you intend to keep the car and atleast I have a starting point on repair needs