“pit.” An Aramaic loan word and the only occurrence of the word in the Old Testament. This is very similar to Proverbs 26:27, but Proverbs has more of the connotation of purposely digging a pit to hurt someone. Ecclesiastes leaves open the possibility that the person may be digging the pit, or breaking through a wall or hedge, in order to do evil, or they may be doing it simply as an ordinary task in life. In any case, Ecclesiastes 10:8-11 sets forth the uncertainty of life, that if you do something inherently dangerous you may be hurt.
“wall.” This could be a “hedge,” or a wall like those around a vineyard that is just made of stacked stones. This does not necessarily mean a wall like a house would have that was mortared together.