First of all, recompense isn’t right. You don’t recompense for a wrong; you recompense the person you wronged. (Never keep a pet thesaurus unless it has a dictionary for company. An unaccompanied thesaurus is a dangerous beast, but a dictionary will prevent it from giving you bad word-choice advice.) You can compensate for a wrong, though, and that’s the closest word that works here without changing the rest of the sentence.
Must serve and mandatory say the same thing; one of them needs to go. Either say must serve a month, or say serves a mandatory month. (I’d go with serves a mandatory month, myself, because must appears again in the same sentence.)
In order to is somewhat awkward/wordy; reduce it to just to.
The US in the year 2050: Every citizen (except the rich) serves a mandatory month in prison to compensate for crimes they must have committed but police failed to discover.
In the US in the year 2050, every citizen (except the rich) must serve a month in prison to compensate for crimes they must have committed but police failed to discover.