on one's last legs
• near the end of life, usefulness, or existence.
• "the foundry business was on its last legs"
Similar:
dilapidated,
worn out,
rickety,
about to break,
about to fall apart,
about to collapse,
about to fail,
failing,
about to go bankrupt,
near to ruin,
going to the wall,
going bust,
going down the toilet,