What would cause the car to stop while driving & cause the PCM P0300 & PCM P0151 on 1999 Cadillac Seville SLS

I have a 99 cadillac seville that has been having some serious issues. I recently had a new/used engine dropped in the car, a majority of the parts from the old engine were put on the current motor. I had severe misfires (PCM P0300). I changed the spark plugs, replaced all the coils, replaced the ICM and still have the misfire. It runs better yet there a rough idle. A week ago the car stopped while driving and I needed a jump to get back going. I had the battery tested and it was ok but the problem persists. I checked codes again and along with the PCM P0300 I get a PCM P0151. I know the 0151 is a overheated o2 sensor and I wanted to know if that would cause the car to cut off while driving (not to mention the jerking). Any ideas

Asked by for the 1999 Cadillac Seville SLS
Does this eng.have plug wires or are coils on top of plug? Po300 is random
misfire may be injector trouble.
Thanx for the quick response! Not sure what you mean by plug wires or are coils on top of plug? Hopefully this helps there are 4 individual coils that with 2 connections for each spark plug wire(Did that make sense?)
Did you replace the wires?
No I did not. I know it would be the smart thing to do. I actually checked them today, they looked pretty good. I will make sure to change them in the next few days if not tomorrow. When you say the fuel there a way to check this myself and how do I know they need to be replaced? They car starts sometime now just afraid if I drive it I will eventually be calling AAA
Replace wires, NAPA has a very good plug wire,that will most likely solve your
problem with po300 add some injector cleaner to tank or even better have them
cleaned.Check with GM dealer for price as some injectors require special cleaner.
Do you have a scan tool? Check charging system also.
I really appreciate the help!!! I will pick up the wires from Napa. Ironically enough I used Lucas injector cleaner yesterday prior to filling up my tank (premium gas at a shell station). I still had the skipping but eventually the car cut off & would not start, had it towed home after not starting at all. Started this morning after a few attempts, how does the P0151 factor into the problem, is it a factor in the problem? No scan tool, I pulled the codes manually.