I think you're right about the venting, mostly - because I think it's totally normal too. Seems like you're doing all the "right" things. Just a couple things I'll mention if you want to try or think about.
If you're not already, be sure to discuss "the plan" BEFORE you go somewhere, etc. Like yesterday, I wanted to get to the bank before it closed, and we were cutting it kind of close. Usually when we go out on an errand, I give about 5 min for him to play in the yard before we get in the car. This time, not ognna happen. SO, as I was putting his sneakers on him, I told him, "I know we usually get to play a bit, but this time we have to go right to the car." and I reminded him again as we were walking down the steps, and I was sure to be holding his hand so it didn't turn into him trying to sprint away and me chasing after him, which would have turned into a struggle....and he was fine with it, just walking with me right to the car. So, like, going to the library, remind him that you can only stay for X time (3 books, whatever), and then do your countdown transition too.
The other thought was sometimes I find that if I sympathize/empathize with him TOO much, it makes things worse. Not that I don't commiserate at all, I just don't spend a LOT of time on it, and we don't really discuss it a whole lot. That seems to be helping him gain some perspective (that he can handle a minior disappointment). So it's more like, "I understand you wanted to X more, but we have to Y now. It's hard when we have to stop doing fun things, isn't it... But, we'll be able to X again tomorrow." But that's almost exactly what you posted you do, isn't it?
.....maybe he would like a little more discussion of the situation? Kids are so different. Maybe he needs a little more built in 'disappointment time' to get over it? Like, give the countdown, but in your own time table build in an extra 5 min to talk about how fun it was, etc. before you actually have to head out the door of the place you're at? Dunno, I found that didn't work for us.
Just a couple thoughts....other mamas will probably have other ideas!
If you're not already, be sure to discuss "the plan" BEFORE you go somewhere, etc. Like yesterday, I wanted to get to the bank before it closed, and we were cutting it kind of close. Usually when we go out on an errand, I give about 5 min for him to play in the yard before we get in the car. This time, not ognna happen. SO, as I was putting his sneakers on him, I told him, "I know we usually get to play a bit, but this time we have to go right to the car." and I reminded him again as we were walking down the steps, and I was sure to be holding his hand so it didn't turn into him trying to sprint away and me chasing after him, which would have turned into a struggle....and he was fine with it, just walking with me right to the car. So, like, going to the library, remind him that you can only stay for X time (3 books, whatever), and then do your countdown transition too.
The other thought was sometimes I find that if I sympathize/empathize with him TOO much, it makes things worse. Not that I don't commiserate at all, I just don't spend a LOT of time on it, and we don't really discuss it a whole lot. That seems to be helping him gain some perspective (that he can handle a minior disappointment). So it's more like, "I understand you wanted to X more, but we have to Y now. It's hard when we have to stop doing fun things, isn't it... But, we'll be able to X again tomorrow." But that's almost exactly what you posted you do, isn't it?

Just a couple thoughts....other mamas will probably have other ideas!