Gouging holes into a surface with magic damage

I have one player currently stuck in a pit. Another player is attempting to use magical damage to gouge holes, or rather handholds into the surfaces of said pit to make it easier to climb out. As far as I am aware, there are no official rules that allow this. But logically speaking, I think it should be possible.

Are there any rules regarding this? And what would be the consequences of allowing this to happen?

I am not asking for other spells or methods to solve this problem. My question is solely regarding the method proposed here.