Generally, this idiom is not offensive. It’s not truly comparing someone to a horse but is referencing a longer history in which horses played a role.