Compensation in what? Replicator rations? Your own shuttlepod? Money doesn't exist in the Federation so unless this is a Ferengi lawyer based on Orion I wouldn't trust him as far as I can transport him.
Check out the book Redshirts by John Scalzi. It’s a meta-satire of Star Trek about what would happen if the redshirts started noticing that anyone who goes on a mission with the captain ends up dying. One of the funniest books I’ve read. As a bonus, the audiobook is narrated by Wil Wheaton.
Kinda feel like wages and medical bills would be a non issue, since you're in a post-scarcity economy and get free healthcare I assume everywhere in the federation. But damn if they don't make up for that with unfortunate deaths
Yeah, it's weird because many people agree that you should be compensated if a loved one does on the job, but in a post scarcity economy what would compensation look like? I'm honestly not sure, it's kinda weird to think about.
Restorative Justice, which a post-scarcity communist society would definitely have, dictates that the compensation for crimes should be focused around making the aggrieved whole and ensuring the aggressor no longer does the egregious action. In a murder case, that could amount to requiring you to do service for the deceaseds family for years, since you can never fully make them whole. Punishment does not work, and would not be a primary motivator in any Star Trek universe, because it doesn’t resolve any of the problems and only creates more.
So in all likelihood, civil cases would be solved through reconciliation, restoration, and education to prevent further such issues.