Why does engine cut off after idling for awhile?

It doesn't back fire or idle down, it just straight up quits running. Like someone turned it off. I have the Accel coil on there. It's not but maybe a year or two old. It's got a what I still consider a new engine harness even though it's a couple years old from Year One. The wires, cap, rotor, and distributor are all with a year or two old and not but a few miles. I will tell you that the plugs are new and I'm sure it's something to do with it somewhat. But they get fouled out quick with oil. It could definitely probably use some valve stem seals is what my mechanic said when he checked it last summer. I can believe it probably needs a full head rebuild. It smokes lightly when it's first started after awhile of sitting for a few seconds and then goes away. That's why I assumed the engine has some miles on it. It's not even the right engine. Someone swapped a 225 for a 170. It's now got a 66 170 and 44 less horsepower, probably a lot less now. I just was leaning towards an electrical malfunction. So I'll have to do some checking.