Dose/taste of one’s own medicine
Means that the bad things done to other people are sometimes re-visited upon the original perpetrator. It is similar to the phrase to take one’s own medicine, which means to accept punishment or something disagreeable. These ‘own medicine’ expressions in various forms date from the mid-19th century.