Had a problem trimming down my 2005 225L EFI enough to get on plane. Looks like the trim motor is failing. Since I had driven 3 hours to fish I tried to get on plane by dropping the hydraulic jack plate down. After trying a while I aborted due to the nose being straight up and could not get up. Idled a bit and got to about 10 mph, then tried again. This time I eventually got on plane. ran for about 4 minutes at ~ 35 mph, then heard a pop, and the engine shut down. No alarms, just dead. Tried the key and could not turn the engine over, and the horn did not come on as it normally does. But had power to the trolling motor and hydraulic jack plate. Thought the pop was a fuse (could have been a backfire?) so checked for loose wires and blown fuses. Nothing. Found a brown wire with white tracer unplugged. Not sure what it is for. As we were tying on a rope for a tow back to the launch we heard a click, and had power back to the key. Motor cranked right up. Tried to idle out to try it again and once again it died. About 5 minutes later another click, and we had power back. Put it on the trailer. Later I unplugged the trim motor thinking it may have gone to ground. Was able to idle around all day but did not try to get on plane since the motor was still not tucked under enough.Thinking it must be related to high water temperature or low oil level given the extreme angle I had the motor, but I did not get an alarm first, and a friend speculated high temperature would not kill the engine, only keep it below ~ 2500 rpm. Any insight into what would shut down the engine like this, then reset, would be appreciated.