I can see why you'd suspect that. But it turns out that the oil and gas industry has 100 years of precedent demonstrating how to build such shafts into bedrock. Flooding and earthquakes are all real concerns, but we have well-proven solutions.
Oil rigs only need to drill a hole with the diameter of a pipe. With gravity storage you would want the hole to be as large as possible.
Maybe not as large as possible, but we're looking at about 10m diameter and about 1 mile deep. Here's an example of existing mining tech that meets this capacity.
https://www.youtube.com/watch?v=z5vAWR7rpco