having the ogres decide to track the raiding party makes sense.
having the ogres find them, then sneak up on them in the night and get surprise makes sense for a rewasonably smart, organized and at the least moerately stealthy bunch.
Ogres, however, are INT 6 and if in their normal hide armor mm stats have a hide and silent check of about -8 (-1 for dex 8, -4 for size large, -3 for hide armor.)
The normal modifier to listen checks for sleeping people is -10, so all the sleeping guys have a base d20-10 vs d20-8 to hear the ogres approach. A sentry, if they had one, should have had an easy time hearing or maybe spotting (light issues are a concern here) the approaching ogres.
As a GM you do need to take into account the monsters cr, sure, but it helps to look at what that cr comes from. In the case of the ogre, you have overwhelming melee brutality but this is hindered by everything else. He is unlikely to ever get an ambush or start at close quarters because he is so pathetically easy to spot and be heard. he is also not all that bright, so you don't expect great organization and sophistication from him.
Deciding the ogres go to hunt down their prey is fine.
Deciding the ogres spot the prey and then stop, think about it, fall back to plan and prep, organize a coordinated assault, and then manage to stealthfully sneak up on them without being heard is a bit too much for ogres IMO.
Once you, by running these ogres so smart and stealthy, got rid of the main ogre weaknesses, you raised their threat level by amazing amounts.
In the DND game i ran, as an example, i used ogres quite a bit. Over 90% of them died without ever reaching the PCs. The few that did hurt the PCs like no tomorrow, causing their prodigious damage. The majority were heard or spotted on approach before they saw or heard the PCs, sometimes they both spotted each other though at longer ranges. While the basically no-ranged ogres rushed in (usually with the disorganized mob "get 'em" tactics) the pcs usually managed to throw spells and use ranged weapons to divy up the incoming forces.
had i instead started using uber-ogres who could sneak up well, could hide well, and who used intelligent tactics well above their INT 6, who were orgnaized and coordinated... then they would needed to have been considered far more than cr2, as they would be almost always playing to their strengths.
*********
Now, aside from the potential uber-ogres deployed, sticking to your guns and making sure the heroes paid the ultimate price is fine and dandy, that is, if you all enjoyed that. it sounds like either you or they or maybe both did not enjoy that. if thats the case, and given this is a repeated thing, you need to think about what you can do differently.
The most obvious thing, beyond using ogres as less "savvy, stealthy, big-commandos" and more "-8 to hide, int-6big-hulking-brutes", is to not have them kill the PCs immediately. Think of any number of action/adventure movies where the bad guys capture the heroes. In how many of them did the bad guys just off the starts as soon as they had the chance? Most? Some? Any? None? Yeah, thats probably mostly a none.
A party failure is an OPPORTUNITY for you, the GM. Sure, you can decide to use that opportunity to just slaughter the PCs, but do you have a story followup for that? if the movie you paid to see ended that way, would you walk out going "gee, great, i love the realism!" or would you walk out saying "man, what a gip!"?
How would the Homer's epic have played out ic the cyclopes had just killed Ulysses men instead of taking them prisoner?
How good a film set would it have been if the nazi's had just killed indiana Jones in any of the myriad of times they had him as prisoner?
How much better would Star Wars have been if han Solo had just been killed by Jaba or if Vader had killed Luke when he turned himself in?
Do you want to be the guy that players walk away from going "wow, that was as good as star wars" or the guy whose players walk away saying something a lot less favorable?
Easy alternatives to the "slaughter" option for your opportunity include...
1. ogres take them prisoner for fun and games. (hopefully you could have foreshadowed this with evidence at the ogre camp when the pcs raided.)
2. ogres take them prisoner for cutting a deal. There is something the ogres cannot do or do not want to do themselves, and they will bargain to get the pcs to do it for them. (sure, this sounds lime smart savvy ogres, but thats what you threw at them anyway in the slaughter option.)
3. The ogres take them alive back to cam because they want to sacrifice them or maybe cannot agree on a good split of the meat... everyone wants to be the one to eat the elf, so they head back to camp to decide by contest who gets the elf. this provides several opportunities: the pcs get a chance to outwit the int-6 ogres, possibly enabling those with social skills and chrarisma to pu them to good use, or even give the big burly fighter guy a chance to impress the ogres in their own games of brutality, or all of the above.
As a GM, you need to have plans "on deck" for what happens if things go wrong, if you cannot wing it. usually, some small touches (like having the PCs find a sort of "combat challenge ring" (a huge pole with two ropes tied to it and lots of blood on the ground), cages for holding prisoners, and the like when they first passed thru the camp) can act not only as good flavor but as foreshadowing for your opportunity later.