If you take your car to the shop and can't pay for the work to be done, they put a mechanic's lien on it, and impound the car until the work is paid for. This is no different from that method, which is totally legal.
Similarly, I've met software developers who set timebombs in custom software they write for companies, with an easy to install patch that gets released when that company pays it's bill.
If you're out to screw someone over and take their work without paying them, then being deprived of the utility of the unpaid work is the minimum amount of damage you should expect.