The one who quarries stones may be injured by them, and he who splits logs endangers himself.
The scope of these verses is to keep subjects loyal and dutiful to the government. In Solomon's reign the people were very rich, and lived in prosperity, which perhaps made them proud and petulant, and when the taxes were high, though they had enough to pay them with, it is probable that many conducted themselves insolently towards the government and threatened to rebel.
Commenting on Ecclesiastes 10:4-11
Whoso removeth stones shall be hurt therewith,.... That carries them from the quarry, where they are dug; or takes them from a heap, where they lie; or that attempts to pull them out of a building, where they are put; or removes them from places, where they are set as boundaries and landmarks; all which is troublesome, and by which men get hurt; the stones...
removeth stones--namely, of an ancient building [WEISS]. His neighbor's landmarks [HOLDEN]. Cuts out from the quarry [MAURER]. endangered--by the splinters, or by the head of the hatchet, flying back on himself. Pithy aphorisms are common in the East. The sense is: Violations of true wisdom recoil on the perpetrators.