Answer based on the NEC in the US:
Can I install a receptacle a few inches in on the half-height wall (so that it's still under the counter, but not a full 12" in)?
Yes, that's almost right. As long as you are not more than 6" in laterally off the counter edge you are fine.
TheAlso, the receptacle cannot be more than 12" down from the counter top.