Coffee grounds do release some nitrogen. In a heap, they count as "greens". They make a nice mulch for keeping soil mosit as long as the layer is not so thick that it cakes solid. If it does, break it up and scratch it inot the soil to keep it loose and friable. I prefer coarse mulch, like bark chinks. (Pine bark is another of my fetishes. I love pine bark!)
The only "balancing" I do to my heap is to note that it is almost always too "brown" because most things I add at the beginning are high in carbon, low in nitrogen, like plants trimming that includes woody stems. brown leaves and paper are "browns". I try to chop up and then mow all branches I put into the heap, but when I have a lot of clippings, they go right in. The long sticks keep it very well aerated until I get around to pulling them out and chipping them with a mower. they also soften as they sit in the heap.
Then I add "greens" like coffee grounds and kitchen scraps as I produce them. "Garbage" people call it, but to me it is candy for my heap). I should stir it in more than I do. Mostly I just bury a few quarts at a time, and it has mostly turned into soil-looking stuff a week or two later.
So right where I have just added a big load of "garbage", if I don't mix it around with a pitchfork, that part of the heap becomes "too green", and may turn smelly and slimy for a few days. but it is buried, so i don't notice. Also, it is just one small spot in a well-aerated heap, so it doesn't get very smelly (anaerobic).
If you have a big heap with too many greens, too wet, and not enough coarse stuff like branches to keep it aerated, you MIGHT see it settle down upon itself so much that it gets anaerobic, smelly and slimy. It's just crying for attention, like a little turning to bring the inner layers out to the air. and less water. And it is saying that it is too rich, and could stand more paper or sawdust or straw or pine needles or brown leaves or any old "brown".