1992 Lincoln Town Car engine swap?

I have a 1992 Lincoln Town Car 4.6L with 2 engines messed up to due to over heating and water mixed in the oil. 1st engine was from an engine of a 1993 lincoln, the second was a 1994 Crown Vic, I would love to save this car since its cumfy, no scratches, dings, or dents on the car, i used my graduation money to repaint it white and put new seats, but recently i noticed that i waste to much gas than normal. Then i noticed that it turns off as i wait at a red light for a minute "no gas goes to the engine, car still on" inwas thinking if it is worth investing money into a differnt engine? Like maybe an LS1 4.8L or 5.7L engine or a 2007 Supercharged ford engine 5.3L from a mustang? Is it a good idea to invest more money into this car or just buy a new one?

Seems a waste to swap in a more expensive engine until you learn how to keep the one you have running.