For a machine that's doing real tractor work, running at target revs most of the time, EPA stuff is less concerning. And generally the emissions controls work better on the larger machines. If you're putting that many hours on a machine, I'd get the newest and lowest hour machine you can afford.
On fixing before selling - maybe, maybe not. If you're doing the work to fix it yourself, probably yes (because you'll get back more than you spend). If you're paying a dealer to fix it, better to trade it to a dealer, they'll fix it with their own money (and without dealer margin) then sell it. It probably depends what's wrong and how much you like fixing machinery, but my guess is you're better selling it to someone who likes fixing things and wants the challenge. They'll save a bit of money, you'll avoid having to fix it.
On your specific question of: "What new-ish Kubota models are equivalent to the M9540", I don't know - I live at the small tractor end of the market. But I'm sure someone knows. I think I hear:
- A newer or lower hour M9540 - you're putting a lot of hours on, you can probably find one similar age to what you have but with 1-2,000 hours if you look. That'd be good buying if you don't need new features, and it would avoid emissions controls
- An M5-111 as you suggest, it would have emissions, and given it looks like you'll work it hard for 6 years then sell it, I'd suggest emissions aren't a big problem - they won't have time to go wrong/wear out/break, and you'll be keeping the engine and exhaust hot so you won't even notice they're there
I suspect there are other similar models and people on here could suggest what's good, bad or indifferent about each of them.