13th Amendment considerations would tend to disfavor under the doctrine of constitutional avoidance, large sums of money damages for the executory portion of the contract at the time of separation, but damages for quitting before the end of a term of employment are not forbidden if reasonable.
Almost every state severely limited the reasons, duration and scope of non-competition clauses in a contract under a rule of reason that is highly fact specific, but would rarely exceed five years absent unusual circumstances and would rarely exceed the geographic scope of the business of the employer at the time it is entered into. These limitations would also apply in cases of an employment contract that was terminated by an employee as a matter of right (even if the contract provided a longer term). While an employee has a duty of loyalty not to compete with a current employer unless agreed otherwise, this duty of loyalty would not extent into a period after the employee quit; once an employee quits as every employee except a soldier or an attorney before a tribunal has an absolute right to do, any remaining non-competition provision would be interpreted under the general law of non-competition clauses in the state in question (the enforceability of such clauses varies greatly from state to state with California being very liberal and the Northeast generally being rather strict).
Compensation can be set in any way that obeys minimum wage, overtime, tax laws, and similar other regulations of wages not particular to this kind of contract, subject to the absolute right to terminate the contract and pay any damages as of the date of termination (under the 13th Amendment) and restrictions on unconscionable contracts as applied (which is a very high bar).