The referent of προπηλακιζόμενον . . . πίθηκον is τὸ θυμοειδές, not the whole person him/herself, but rather the θυμοειδές part of the psyche, the source of courage and the drive to action. A person besmirches τὸ θυμοειδές and turns it into an ape instead of a lion, when, from childhood, he or she allows το θηριον, the desires, to dominate it, instead of the other way around. (In the Republic Plato insisted that women had an equal capacity to act as political leaders to that of men, to the ridicule of his contemporaries.)
This is Platonic psychology, as developed in the Republic. The psyche consists of three parts, (1) the reasoning/rational part, το λογιστικον, ( 2) τὸ θυμοειδές, the source of courage and the drive to act, and (3) the appetitive part, i.e., the desires and appetites, which Plato refers to here as το θηριον, the beastly part. This psychology is laid out beginning around 435e. Each of these elements of the psyche corresponds to a segment of the population of a polis.
Ideally, τὸ θυμοειδές, governed by το λογιστικον, is supposed to keep το θηριον under control, suppressing desires that are contrary to reason. (And by analogy, this is the justification for Plato’s ideal police state.)
Here, Plato says that κολακεία and ἀνελευθερία occur when a person accustoms τὸ θυμοειδές to be subject to το θηριον from childhood, reversing the ideal situation where τὸ θυμοειδές controls το θηριον. (Plato constantly emphasizes the importance of early childhood training in shaping the psyche).
Here the metaphor of the appetitive part of the soul as το θηριον is somewhat distorted, because τὸ θυμοειδές itself is represented by beasts, a “noble” beast, the lion, the symbol of courage, when it controls το θηριον, and a beast viewed as ugly and comic, the ape or monkey, when it is controlled by το θηριον.
Something like this: " . . . when someone [ὅταν τις] . . . , because of money or insatiable desire, accustoms from childhood τὸ θυμοειδές, being splattered with mud/dishonored, to become an ape instead of a lion."
" . . . when someone . . . , on account of money or insatiable desire, accustoms τὸ θυμοειδές to be dishonored and to become an ape instead of a lion."
Of course, the foregoing is just a very crude description of Plato’s psychology, as set forth in the Republic. You need to read the Republic in its entirety to get the whole picture, and even then you may find yourself scratching your head.