WRT genetic testing alongside the existence of prohibitions on cousin marriage, I'm thinking of the US example, where states decide on an individual basis what, if any, restrictions there will be. Some mandate genetic counseling.
In populations such as, for example, Ashkenazi Jews, where the incidence of Tay-Sachs disease is high, babies are screened at birth, and many couples opt for genetic counseling before embarking on ttc. Another disease that is screened for is sickle-cell anaemia, prevalent inthe African American community, and again, genetic testing is available before ttc if desired. (A former neighbour had to have her children screened for both under the state law.)
The federal setup in the US allows for a hodge-podge of regulations and people may travel to another state to do what is prohibited in their state of origin, but in general it is a practice that is frowned upon no matter whether it's legal or not, (and associated with hillbillies).
I used polygamy, etc., as examples of cultural practices that are not traditionally British and which are banned in Britain despite the fact that they are carried on elsewhere, not to indicate that marrying a cousin falls into the same category of behaviour as something like widow-burning, just to illustrate my point that respecting cultural differences shouldn't necessarily be a reason to dismiss a ban. And yes, governments do legislate and prosecute incest, a practice which has been traditionally forbidden. But I think my point in mentioning relatively recent legislation in the area of spousal relations and parenting practices was that legislation in these areas has had an educational effect, despite difficulties and shortcomings in enforcement.
Marrying cousins has traditionally been banned by the Catholic Church (first cousins = 4th degree of kinship) while Protestant denominations have generally allowed it, partly in reaction against the Catholic church's practice of granting dispensations to well-off Catholics and the suspicion of lucre being involved in the dispensation process. The UK until relatively recently included the mostly Catholic population of Ireland, and Catholic first cousins in the UK are prohibited from marriage in the church. There's a protestant-Catholic divide on the question, even in Europe.