A less morbid equivalent of the idiom "Giving someone enough rope to hang himself"

More of a phrase than an idiom, but...

set someone up to fail / set someone up for failure

From Wikipedia (I know, I know... but it's the best source I could find):

Setting up to fail is a well-established workplace bullying tactic.[6][7][8] One technique is to overload with work, while denying the victim the authority to handle it and over-interfering;[9] another is the withholding of the information necessary to succeed.[10]

If a person puts another individual (usually a subordinate) in a stressful situation in which failure is almost certain, this may be an aspect of bullying wherein the outcome can then be used to discredit and blame the victim.[11] Sometimes, this may involve the bully covertly sabotaging and undermining an objective that may have otherwise been achievable. This type of bullying may be the result of the projection of the bully's own feelings of inadequacy onto the victim.[12]

There can be cases where an employee is set up to fail because the stated goals of the task are considered harmful to the organization; an internal investigation is one example. Institutions may protect themselves by "going through the motions" of a sham investigation in which the findings conveniently fail to find any evidence of wrongdoing by the authorities involved with setting up the investigation.

From the Harvard Business Review: comic illustrating a boss setting someone up to fail

That was specifically about employees and bosses, but it's possible for parents/children, co-workers, teammates... any number of relationships. Even yourself!