You're free to hold an LLM accountable in the exact same way: fire it if you don't like its work.

Giving something that has no internal concept of time (or identity for that matter) a prison sentence of n years seems kinda ineffectual.

Prison sentence? For writing sloppy code? Now that's an interesting idea...

“Generate 100,000 tokens about why you feel bad.” :P