First, the ambush is probably the most over used and boring encounter design you can have. It prioritizes having the biggest hammer and treating everything as a nail, so if you want to see repetition, by all means do a lot of ambushes.
Tactics are the result of two things - weapons and terrain.
To 'throw the party off balance' vary the weapons and terrain.
In fact, the terrain is the extra monster in the encounter. It's easy to just about double the difficulty of the encounter using just terrain. Terrain is so important it ought to get a CR.
Key elements of terrain include elevation, distance, cover, concealment, hinderances to mobility, and hazards. Terrain advantages are maximized by mobility, ranged weapons, and stealth.
Elevation skews a battle to occur in one direction. The upper side not only gains a small advantage attacking the lower side, but so long as it retains the upper side it requires the lower side to make more effort to close than is required by the upper side. Elevation can also create barriers to movement and complex environments where the distance between attacks is not the same as the distance required to close between attackers. Elevation is countered by flight, which itself can create elevation.
Distance is one of the great equalizers. At sufficient distance, all ranged attacks are basically equal, striking targets only at random. Distance can be used to make numbers tell over skill. Distance nullifies advantages in close striking power, and if you have the advantage of range allows creatures to make attacks without fear of response in kind. Distance is countered and exploited by speed, which allows the faster side to choose and maintain the range. If you really want to give players headaches, don't ambush them. Attack them with mounted archers. Speed can be partially countered by dispersion. If you spread a unit thinly over a large area, the cost of tracking down the entire unit is high, allowing more time for the unit to pepper you with ranged attacks. Dispersion plus mobility tempts opponents to become scattered, allowing them to be defeated in detail.
Cover allows attackers to have prepared positions. It equalizes attackers with different skills levels. Placed behind an arrow loop, an archer can engage in an equal duel with a far superior archer that lacks cover. A unit beginning a fight with cover can not only win the early stages of the combat, but they can use that cover to cover an escape before the enemy can develop an adequate response. Cover is essential to hit and run tactics.
Concealment is similar in many ways to cover, but it also negates distance, speed, and ranged attacks. Persistent concealment in the environment forces all combat to take place at essentially melee distances. It also makes coordination difficult, as it is easy to lose line of sight on your comrades and blunder around lost in a literal or figurative fog of war. At higher levels many brute monsters - that is monsters without ranged combat options - go down hard to PC parties because of the powerful ranged options that a high level party tends to collectively have. One solution to this problem is concealment. Concealment is exploited by stealth and mobility, and countered by perception - particularly the ability to track, smell, or otherwise get information without the need for line of sight. Concealment like cover allows for hit and run tactics.
Hinderances to movement refers to difficult to traverse terrain, which in D&D terms almost always refers to battlefields where all or part of the terrain requires a movement type for which the PC party lacks a natural movement speed. If the terrain requires swimming, flight, climbing, balancing, or can be burrowed through by a burrowing creature, and the PC's cannot respond in kind, then they are at a great disadvantage. If the players are in narrow places, or walking on ice, or underwater, or fighting in tree tops, this will greatly change the difficulties that they have to overcome. Lesser difficulty can be had with highly uneven terrain such as rubble, tree roots or barriers that are hard to push through such as bushes, deep mud, waist deep water, ect.
Hazards refers to portions of the terrain which have obvious or concealed dangers. These are portions of the battlefield that you need to avoid. These can include pits, precipices, deep water, fast moving water, fires, traps, quicksand, tar, deep mud, poisonous or dangerous vegetation, noxious fumes, thermal features such as boiling pools, or in magical terrain pretty much anything you can imagine. If the opponent is immune in part or in whole to a hazard, then they gain an enormous advantage. For example, skeletons for the most part do not care if they are fighting in a room filled with deadly mold - they can't breath, the have no flesh to infest, and they give off no heat. The combination of skeletons and terrain infested with deadly mold is much more deadly than either of the two alone. Amphibious creatures generally don't have to care about drowning. Fire loving creatures would prefer if the terrain was on fire.
Players will not feel unfairly targeted if the terrain threats that they face feel completely believable for the location that the combat is occurring in, and if the monster is intelligently exploiting the terrain. It doesn't require an unbelievable tiger for that tiger to want to exploit tall grass in order to hide, successfully pounce, and then retreat. That's just what tigers do. That's how they live. If the monsters aren't exploiting terrain, and all your fights are occurring in flat open terrain at encounter distances of under 60' then perhaps that should feel unbelievable.
One particularly satisfying sort of terrain in my experience is one that is moving. Fights that are also and at the same time chases can be highly dynamic with the terrain continually 'coming to the player' instead the player choosing the terrain.
Weapons refer to choosing monsters or monsters choosing weapons that represent different sorts of threats - reach weapons, nets or entangling weapons, grenade like weapons, and most especially ranged weapons. Intelligent monsters can do all the things that PC's do - deploy tanks as cover for artillery, use battlefield control, and attempt to outflank the PC's.
Finally, tactics are not the whole of a battle. Not every battle has the simple objective of closing with the enemy and destroying them. Battles can be complicated by having different primary objectives or secondary objectives. For example, a battle can take place near innocents, which potentially produces a secondary objective of avoiding or preventing harm done to innocents. A group of bugbear slavers transporting a group of slaves in cages on wagons might counter the typical PC tactic of opening with fireball (at least, for most groups of players, and if it doesn't then that is interesting as well). Or a battle can take place near fragile treasure that the PC's don't wish harmed. Or the PC's may know that the enemy forces are able to bring to bear overwhelming resources a little while after battle is joined, and so must choose stealth or hit and run tactics.