Exact same issue. I referred to it as 'random focus.' When testing on a well-lit, high contrast target I'd get results like 1 or 2 of 5 in focus, sometimes 0 for 5 in perfect focus. Methodology was camera on tripod, 2 second timer, one-shot, center point focus, etc. Manual defocus of the lens and use the camera's AF to acquire focus. When the camera beeped, I started the 2 second timer.
Results were consistently atrocious. Camera sent to NJ repair facility. Came back in good working order. First test yielded 24-25 perfectly focused shots. No more testing required.
Good luck. I hope yours comes back in as good a shape as mine did! It's a great body but focus reliability is #1 with any camera.
It's funny, as a gigging musician I look for the same thing in a guitar. Does it, a) stay in tune; b) have great tone; c) play well. Couldn't care less if the guitar is poop brown or the prettiest thing on earth ... if if doesn't meet a-c, it doesn't work. Same with cameras and lenses. If they don't focus accurately and produce sharp shots, they are worthless to me.