Mechanically, if you have a chute made from say 4 6mm dia brakepipes laid at 45 degrees, this can be your 'magazine' of new balls.
Cut away the top 6mm tube at the bottom just a little longer than the dia of a ball, then put a bit of rubber on the end of your solenoid so the ball doesnt bounce out of the mechanism and arrange it so that the ball is lifted up out of the mag and onto a chute that takes it down to the player.
An infra red break beam type detector would sense a ball going into a pocket, you might need 2 if the pocket diameter is more than twice the ball.
To detect a hole in one you'd need some clever device in the club, battery powered with wireless comms, something you'd really only attempt if you have experience of microcontrollers.