I put up some IKEA cabinets (using their suspension rail). I used a 5mm (#10) x 50mm (2 inch). Minus the drywall and rail it probably went in about 35-40mm (1.5 inch) into the stud.
After all was said and done, I realized that the screws didn't need to be that long (or thick). I understand now that by using longer screws it increases the chance to hit wires or pipes running through a stud. However, I don't think there are any pipes or wires in the wall where I drilled. Given that I didn't hit any pipes or wires, is there any concern that the larger screws I used could weaken the stud or foundation?
As long as you didn't split the stud, I don't think it's an issue. I recently used #8 x 2.5" screws (longer than what you used) for hanging trim and picture rail. I used #10 x 3" (going 2.25" into the stud) to hang a heavy duty clothing rack with no issues.
A hole in a stud can be 1 1/4 inches from the edge of the wood. That means you have a minimum of 1 1/4 of wood to drill into safely. Any less than that and a nail plate is used to protect the wires or pipes. However, most people don't run wires or pipes through eye level holes specifically for the reason of future items being hung. I personally either go through the cieling or behind baseboards, but about waist high seems to be a common practice as well. Eye level is definitely not common. As far as structurally sound, your fine. Your screws are basically at max capacity. Splitting would be the only concern. As long as they are centered and you didn't go crazy, like 1 screw every 4 inches.