Project HARP is a useful reference for this. The project successfully fired instrumented rounds at 2100 meters per second. This is from a 36 meter barrel so suggests 6000G with enough science hardware surviving to justify the program in the 1960s.
In terms of payload making electronics survive high G is not impossible, though any form of mechanical parts (like fuel valves or antenna) that need to move after firing gets complicated. Probably the biggest issue is power, since solar panels are notably fragile both as a bulk material and the wire to semiconductor bonds if kept light in weight and would presumably need to fold out after firing to get usable area.
This also brings to light another issue with gun fired probes, in that to protect the electronics your chassis needs to by physically substantial, eating deeply into the science payload with structure that post firing is wasted mass (no easy way to stage structural mass out of a gun launch). Also if they are coming from earth this makes your per probe mass cost cost high.
In terms of where you can get, 2100ms is not enough to be useful from LEO but from say lunar L3 it might be able to make various points in the asteroid belt.
The two issues with this is that this leaves you lifting the whole gun system close to earth escape velocity, and when the projectiles get to the asteroid they will not be doing any sort burn to orbit the but instead returning repeatedly to earth's orbit round the sun. Earth will not be there the first time, but if the plan is to fire one of these at every likely mining target in the asteroid belt you will start making owners of earth and lunar orbit infra structure nervous as the odds of impact climb.
And even if the accidental impacts do not upset people, like many high performance space systems this makes a handy weapon if you point it inwards which may either make people nervous, or be how you avoid having your funding cut.
A possibly more sensible place to put this is in the belt itself, since some form of electric gun can probably be built from materials in situ, and used for both thrust and exploration.
This also suggests a possible use case. Taking a photo of the outside of an asteroid is not particularly useful during a high speed fly past, possibly more relevant is to fabricate a projectile of a pure material, fit a basic terminal guidance system and hit the asteroid of interest while watching the spectra of the collision and possibly resulting dust cloud. This would give information about chemical makeup, mass and structural integrity, and 'solves' the communication problem.