Yup. This. The bankruptcy system already has tiered creditors (senior, junior, secured, unsecured) who take precedence in certain orders during bankruptcy.
In fact this already exists in accounts payable situations: customers may take precedence for goods not received before creditors, etc (depending on location and laws of course). But usually they don’t, sadly.