Easy solution: prorate their salary by percentage of games played, down to a minimum threshold to account for legit injuries.
I'm sure the NBPA would love that...
You'd also need to punish teams somehow for holding players out when they're healthy. Forfeiting games would be too extreme, but I could see penalizing draft assets by losing lottery odds or moving back in the selection order. Okay, so it's not such an easy solution.