European aristocratic families used royal intermarriage for hundreds of years to create alliances and it seems at some point all european mayor families were genetically related to each other, which caused some issues.
How bad was the impact of inbreeding among them and were they aware marrying relatives could cause unfit offspring as an outcome?
There's certainly more to be said here about the history of the understanding of inbreeding, but you may be interested in this past answer of mine: Did European nobility just not realise the damage all that inbreeding was doing to them?
tl;dr: it wasn't as much of an issue as you might think