It really depends on what exactly the deformity was(in which direction the legs were too flexible and how severe it was, whether it responded to bandages and splinting or required surgery, as you think this one may have had); the vet who saw the foal and treated it is the best source of information; he may be able to look up the records his vet clinic keeps on the horses, and see what specific it deformity was and when it occurred and how severe it was.
Vet records DO belong to the owner of the horse at the time the treatment was given, so the owner would have to call the vet and give permission for you to get a copy of the records. And yes, I'd recommend if you do get access to the records, get them in the original form...hard copies.
Keep a little caution, as the seller may not be giving you the full story on the previous foals. That has happened to me...seller lying about a mare's reproductive history and concealing problems that occurred.
It would also be relevant to ask if there were any other reproductive or health problems.
Not sure if you have seen the deformity or which way the legs were going, that they shouldn't go.
The bottom line is that everyone thinks they know what causes foals to be born with very crooked legs, but there is not much or any, research behind those opinions. The best one can do is take mares who repeatedly have severely deformed babies that don't recover, out of the broodmare bunch.
When I worked on a breeding farm with several hundred mares, they just did not have the problem with the deformities in the legs. There were very few horses born that way on that farm. The stallion size very closely matched the mares, they were at a correct weight when bred and foaled, the mares had large pastures to move around in and weren't brought into a stall until they were just about to foal. And yet even the farm manager with 60 years of experience as a stud groom did not believe we could say why it happens. He did not discount the possibility that it was more genetic than environment.
Not clear from your description, but it is not unusual to see newborn foals BORN with their front legs too close together at the knee when they stand up shortly after birth. What used to be called 'knock kneed'. Knees can deviate either inward (knock knees) or outward ('bow' legs).
It's also possible to see 'windswept' foals - both forelegs look as if they have been 'blown' over to one side - one leg deforms outward, and the other foreleg is deformed toward it.
It's also possible to see foals born with their fetlocks on the ground.
Again, these are all at birth. There is a whole class of other leg deformities that develop after the animal is born, usually during rapid growth spurts, and often, because incorrect feed has caused too rapid a growth. These are quite different from the leg deformities foals are born with. This group of deformities can often be prevented by making sure the mother is properly fed (not overfed) and the foal is not over-fed after he is born. Feeding high calorie, high protein, high fat feeds in excess to EITHER of them can cause serious growth problems in young horses, even when the overfeeding occurs after they are weaned. Several of my friends have had to euthanize foals that they overfed. The tendons contract so they are on their tiptoes without the heels of their hoofs touching the ground, and overfeeding can also cause very severe cartilage defects in joints. There simply is a limit as to what animals can be fed, both in quantity and type.
Regardless of the type of leg deformity or when it life it occurs, the veterinarian has to be the one who grades the deformity, evaluates its type and advises if the foal should be treated (casts, splints, bandages, possibly surgery) or be euthanized, if the situation is hopeless.
Occasionally you hear of novice horse people, or non horse people, 'shocked' that a vet advises euthanasia for a foal, even when it seems to be getting around ok when it's quite tiny. The vet knows that when the weight of the foal starts to increase, the legs will give it terrible pain. It's important to respect the opinion of a person with long experience with these deformities. Or we can be very cruel by trying to be kind.
But this happens because some people don't understand how big (even a mini) a horse is at maturity and what a formidable job the legs have to do to keep the animal on its feet; many don't understand that a horse with severely deformed legs is going to be in horrible pain once it grows large enough that those legs no longer support it adequately. I've seen people keep deformed foals til they were in a very bad way...starving, unable to move, suffering from horrible depression...the people thought they were being 'kind'. But severe deformities of the leg that are too severe to treat are grounds for euthenasia on humane grounds.