Nope, this isn't railroading, because, again, the players are not choosing a slot to avoid this encounter. Instead, this is a GM saving on prep time by having an interesting encounter with ogres ready to pace the game. The slot the players choose still leads to whatever it was they picked that slot for, but they will have an interesting encounter along the way. Here's this expanded:
Players can choose from two paths. Path one leads to an abandoned temple where they will learn secrets to assist their quest. Path two leads to an enemy camp/forge where they can acquire powerful weapons to assist them on their quest. The GM had determined that, regardless of which path the players take, they will have an encounter along the way.
Okay, take a moment aside, if this isn't railroading, then prepping one encounter and using it for either path isn't railroading, either. The choice to have the encounter is one of pacing and tension, and isn't related to the choice of path. So, a GM can prep two encounters, one for either path, or take a shortcut and only prep one, and use ogres either way. This isn't railroading, and is still Quantum Ogres. The reason it's not railroading is because it isn't thwarting a player choice -- they have no choice to avoid an encounter. It is GM Force to push the encounter, but this is pretty standard stuff for D&D. That the encounter is ogres because the GM is shortcutting on prep isn't even a thing.
Now, on the other hand, if the choice of path is to go to the temple, which is guarded by ogres, or go to the camp, which is guarded by hobgoblins, and the players pick the second option, deploying ogres MAY be bad. I say may, because it might also be the GM providing additional information about the situation that the PCs didn't have -- maybe the ogres are making a push towards the hobgoblin areas.
If you give a choice to avoid ogres, and the GM still deploys ogres, you're in an area where there may be a problem, but you still need more information -- it's not automatically railroading.