If there is a Murphy switch, it could be shutting the engine off as well. Could be a bad Murphy switch, low oil pressure, or low voltage. The Murphy switch also senses high temp as well. I doubt this is the problem as it would take more than 5 minutes to get high temps unless, there's a bad sending unit.