cousin marriage is perfectly fine and not discouraged in islam whatsoever.
and in theory, it can produce superior offspring. and the risk, which isn't that high to begin with, can be minimized with a simple blood test.
A recent review (Bennett et al, Journal of Genetic Counseling, 2002) says that, on average, offspring of first-cousin unions have a 2 to 3 percent greater risk of birth defects than the general population, and a little over 4 percent greater risk of early death. While those margins aren't trivial, genetic testing and counseling can minimize the danger. An argument can be made that marriages of first cousins descended from strong stock can produce exceptional children.