« Non-paternity events » occur at a rate of a few percents a given generation at best, but it's enough that at this scale even a rock-solid documents trail isn't proof of descent.
It's quite fun to imagine doing research on this. You could stand around outside a primary school with a clipboard at the end of the day and ask fathers whether they believe they are the biological parent of the child and fill in a form that looks like this:
[ ] Man with parental responsibity told me to fuck off.
[ ] Man with parental responsibity said: "Look at him, what do you fucking think?"
[ ] Man with parental responsibity told me it was none of my fucking business.
[ ] Man with parental responsibity punched me on the nose.
[ ] Other.
Then you could correlate that with the genetic data ...
That was much harder to do, in the past, and people back then weren't as foolish and trusting as today. They literally went to great lengths to make sure it didn't happen. And especially royal lineages.
At the same time, testing was also not possible back then.
Is there any evidence for that? In one of David Attenborough's documentaries, he talks about that. Research showed that people are quick to point out that a baby looks like the father, even when the father isn't the biological father. The inference is that cuckolding is a common occurrence.
You're right that people would go to great lengths to ensure fidelity of the women, even executing them for infidelity. They wouldn't have bothered if cuckolding wasn't common. The recent movie "The Last Duel" was historically accurate in that it was a duel to the death over whether a knight's friend had sex with his wife or not.