The New York prison system has programs for raising dogs; they train them for work as service dogs. And while they don’t train wild mustangs (which are rare in New York) they do have a horse farm program. They take care of the horses that are retired from mounted police units.
You ever hear the cliche about a family dog being sent to a farm upstate where it can play all day with other dogs? That actually happens with NYPD horses.
I live just a throne’s throw (almost literally - you can see the west wall looking out my kitchen window) from a prison that has a wild mustang training program.
Probably not what you are meaning but prisoners in Concentration camps in German occupied territory were assigned this task (Work Makes You Free). It was normally performed for SS owned companies selling to the state.