Re: 5th Edition Advice
Consider giving the goblins a small stable of mounts (worgs are always good, but horses, ponies, mules, or more exotic beasts can work well, too) they can ride to outpace PCs. Vietcong-style tunnels is one way to provide an escape route the PCs can't easily follow, but you could also simply add a cliff that runs adjacent to the ambush site that the PCs will have difficulties scaling before the goblins can escape to the scene.
The goblins probably know the area well enough not to need a map*, but unless the PCs explicitly execute the goblins or deal enough damage to kill them all outright, you can always say that one of the wounded goblins are still alive to provide that information. One of the retreating goblins might also step in a trap, twist his ankle or break a leg while retreating, or simply be the retreating goblin who isn't fast enough to escape the PCs**.
*During a 3.5 game I ran back in the day, the PCs assumed that the map they found on one of the kobolds was a trap (although to be fair this pack of kobolds were fond of traps to the point of ridiculousness so I couldn't blame them for being cautious), and during another game with a different group the PCs, the PCs didn't loot bodies as a matter of principle so they never found the map.
**Having one retreating NPC being slower than the rest will force the PCs to stop or slow down to deal with the slow NPC, which gives the faster group yet more time to escape. Or if they focus on the faster group, you can have the slow one get away.
You can also try to make the ambush encounter lead more directly to the second encounter. It might help to make the first ambush a little easier so there's less need for the PCs to rest inbetween the two encounters.
Final suggestion: Why keep it simple and realistic when you can make it cool and fantastical? Give the goblins a rudimentary system of platforms, primitive gondola lifts, zip-lines, and so forth that they use to navigate the forests quickly, circumventing the difficult terrain of the forest floor entirely. The players can follow the system easily when they want to pursue the goblins (mitigating the need to shoehorn in maps, interrogations, or what have you), or even use it to immediately pursue the goblins without pausing for a rest (naturally it'll take a round at the least to get everyone up). Put up some adjacent zip-lines and have an additional encounter in the sky where goblins and PCs fight dozens or hundreds of meters above the ground -- goblin reinforcements arriving by hang-glider as necessary.
The real question to ask here is whether your PCs tend to follow the "go here" clues you leave them (map, interrogation) or if they're more cautious and need to be lead more subtly (link encounters, tracks, platforms and ziplines acting as less obvious clues while still providing the metaphorical rails of the adventure).