If a more durable arrangement is desired, so the employee cannot leave tomorrow with no notice (thereby giving up the normal freedom to work only willingly for employers, and leave when it is no longer willing), then IMO it should be set out in advance and honored by both sides, e.g. by using a fixed-term or minimum-term contract, with penalties for early termination by either side. That way both sides can plan on the stability of the relationship (barring serious misconduct).
For example in my current job, either my employer or myself can terminate the employment with four months notice, after the first six months. This gives us both some guarantee that we will be able to plan for major changes— they will have time to find a replacement if I give notice, and I'll have time to find another job if they give notice.
Obviously, training benefits can be abused. "Here is a 'benefit' that is not really a 'benefit' but instead a job requirement for which we have assigned a nearly arbitrary value; if you leave within 12 months, you must pay us this random number back." But as long as "training" has some value assigned by the market with a reference price not controlled by the employer, what's the problem?
Employers always have to pay for experience. You either pay more for an experienced employee or pay for training.
With an experienced employee you can include actual benefits, like you mentioned, or you can pay to train someone who will take a lower salary.
It's uncomfortably close to indentured servitude to me to say: you can't work for anyone else until you pay off this up-front investment we made in you (working only for us until you do).
What does the contract specify as a remedy for the company if you quit early?
What if it was the employer that taught you the niche field? They hired you, and then sent you through six months of training to learn the field. During this time, you are producing very little of value, but you are being paid.
Then, when you finish the training and are ready to be productive with your new niche knowledge, you get poached by their competitor--a competitor who can pay higher wages because it isn't spending tens of thousands of dollars on training for new employees.
It seems to me that there should be some way for the employer to protect against the above scenario. What would be acceptable instead of a noncompete?
Some ideas:
1. A noncompete that runs from the START of employment instead of from the END of employment. If training takes six months, the noncompete would say you cannot work for a competitor for 18 months after start of employment.
2. Charge for training, with payment due in monthly installments starting at the end of training. The company waives payment for each month that the employee continues working for them. The employee can leave for a competitor at any time, but will then be responsible for making the remaining payments for his training.