Whipping boy
In medieval times, a whipping boy was a boy raised with a prince or nobleman, who was whipped when the prince/nobleman misbehaved.
In modern times, the term "whipping boy" has come to mean a scapegoat, or something that is a frequent recipient of pain or punishment. (Note - this can include inanimate objects)
The Whipping Boy was an award winning children's book, written by Sid Fleischman, and first published in 1986. It was the recipient of the 1987 Newbery Medal.