Sometimes we say " an example to others ( to avoid repeating ) " regarding messing up.
Could also be "role model" in this case possible?
An "example" may be someone who messed up very badly and is anything but a role model.
It can also be used to have positive meaning.
And I would say that it is far more common for people to use it that way.
I've added in "role model" as an alternative translation.