Most of my customers are individuals, so the problem isn't as bad as it sounds. I'm not sure building a complicated licensing system would be worthwhile; the potential additional sales are probably not enough to justify the effort.
In case someone suggests a service that handles licensing for me: I won't buy it. If I wanted lock-in, I'd stick to the Mac App Store.
What if the service did on-premise/self-hosting?
I guess the most important part is that everything would need to happen on my domains; there can't be any other people's domains in my code (eg update checking), that would make me too dependent.
I don't care about on-premise or self-hosting or cloud or whatever. I care about lock-in.
I plan to keep my company around for many years. At some point some of the services I use will go away or get too expensive or become crappy or whatever. That goes for web hosting, SVN hosting, mail server, payment provider, etc. That's why they need to be interchangeable.
I pay for services that add convenience; I don't pay for services that lock me in.
For the version I sell on Fastspring, I use a library called Aquatic Prime, which uses public key cryptography to validate license files. It's integrated with Fastspring, so that's convenient.
I've had a couple of customers where Aquatic Prime failed for hard to debug reasons -- I think the issue was that they had names with special characters that caused sorting issues. If I'd do it again, I'd probably do something simpler, since bugs in license validation code are really bad.
I wouldn't worry about piracy or cracked versions. Someone did crack my apps, but it doesn't seem to affect sales. The only people who care about cracked versions of my app are shady companies promising to get rid of cracked versions by sending takedown requests on my behalf. I wonder if those guys cracked my app in the first place...
EDIT: You asked about missing features. It would be nice if business customers had a way to see how many licenses they are using, and they should be able to easily buy additional licenses. However, building such a system would probably be very complicated and not worth the effort.