OP, I understand you are frustrated, and it's easy to be wise with the benefit of hindsight. You are in the middle of this, so perhaps can't see the wood for the trees.
Based on what you've said, there was an order to sell back in 2018; house goes on the market. As you say, limited viewings, no real interest - feedback is that the house needed work, and dropping the price (presumably to reflect that) made no difference. So at that point I guess around 2019, you and your then partner decide to buy your ExH out, and take the house on yourselves.
Clearly at the time that seemed a good idea, gets the ExH off your back and solves the issue of a house that you're struggling to sell. I'm assuming you made your ExH aware of this and he was on board.
The issue is that must now be what 12 months ago or more? And he hasn't heard anything. Has your ExH not seen his DC in that time? I'm struggling with how he wouldn't know you and your partner had split up, I appreciate you might not have contacted him but if he was seeing your DC I would have expected them to mention it?
I think if your ExH had known you and partner weren't together, if you had communicated that with him or his solicitors, then you could have agreed between you a plan of action about putting the house back on the market, what to do about the price, decorating etc. Instead he's not heard anything from you at all, since 2019 when you said you'd take the mortgage over.
In the circumstances because there is an order in place already requiring the house to be sold, he's entitled to go back before the court to basically say you haven't done what the order requires (and you haven't explained why not). Putting the house on now even though it requires work ensures you are complying with the court order. In the circumstances I would contact his solicitors with proof the property is on the market and advise they do not need to take the matter back to court as the order is being complied with, and given that you have provided evidence of this, you do not agree to be responsible for any associated costs.
What you also need to do is then keep in close contact with your ExH/ his solicitors around the sale of the property - share Estate agent feedback, whether on the condition of the property or the sale price, any suggestions to reduce etc. It's important to keep him in the loop on this so he doesn't get the opportunity to threaten court again. You might want to agree a plan of after X months, dropping the price to Y amount, and so on.
If you do want to keep on trying to improve the house condition using supplies you already have, it might be an idea to reflect this in the particulars (the house is undergoing a programme of redecoration or something like that) and get photos taken of the rooms to be redecorated after that? I've seen this a lot with houses round here that are being refurbished, they are put on the market when not fully finished because a lot of people know based on location/ floorplan if it's what they want.
Good luck with it, I know how stressful the house sale process can be even when it's a voluntary move.