Good Question. I have annual state safety inspection that was done last April but don't know if they specifically checked the ball joint...
I know that in Feb 2017 the wheel was making a noise while steering and i had it checked out at that point and the mechanic said he could find nothing wrong with it and just greased the joint to resolve the noise and I just found the text he sent me "dont know if fixed but it's safe". The noise never really got worse or better since, but the mechanic I trust said it was safe so I kind of ignored the noise since the car is 13 years old as long as it was safe I didn't fear the noise...
From watching South Main Auto on YouTube, NY state safety inspection seems: brake pad less than certain thickness = fail, a loose ball joint = pass.
In my opinion, especially when you live in the snow belt, you need to change out the front lower joints between 8 to 10 years into the life of the car no matter what or that crazy event will happen out of the blue one day. I have seen quite a few vintage Accords stranded on the side of the road with a snapped lower ball joint. Or, whenever you do any brake or tire service, just rock the tire at the 12/6 position to detect movement. I changed out an upper ball joint in the past for my cousin's 03 Accord and the ball joint was literally moving out of the socket. The only thing keeping it in its spot when driving is the car's weight when the suspension is loaded.
In my experience, ball joints give us ample notice before they actually fail. The process seems: ball joint grease lose (due to torn boots or water contamination), the ball starts rubbing against the socket, finally, the ball becomes small enough (or/and the socket becomes large enough) to pop out.
On my 3rd gen, a rear control arm ball joint popped right before I got onto the highway. (when the car was 10 years old). I didn't know better and ignored some clicking noise from the rear for a long time. The boot had a tear.
The upper control arm ball joints become very loose when the car was 17 years old. I experienced wandering on the highway and clicking noises. Both ball joints had cracked boots.
The lower ball joints were still good when the car was sent to the yard at 20 year mark.
I think the key is the ball joint boots, and also don't drive in water high enough to soak the lower ball joints. Do annual front end check. Take any noises seriously.
OP's mechanic failed him.