If its happening on rough terrain it indicates a possible loose connection somewhere which is ultimately turning the engine off. So I'd start with all connection points, ground points ect and take it from there. Check plugs behind ECU, your ignition wiress, injection pump plugs. Could be a broken wire too somewhere.