@tanza:
Great point about the "leave-it" command… and that is so very true, if after the fact, he has already gotten his reward...
And remember Basenji males during breeding season "have" no brain....
yes, and they honestly cannot help it. Their hormones have taken over their brains. It doesn't help to get mad at them, because any kind of reprimand is lost in the moment.
Another alternative would be to give him something that he is allowed to hump. At our house (before Querk's neuter) it was a big blue blanket called "the humpy blanket" embarrasingly! But it kept him from humping the couch cushions and the cats, and our jackets, etc.
But, in all honestly, he was never the kind of dog that would consider humping a human…there are probably some behavioral issues with this young dog in the OP as well.