I would treat this as a temporal problem, something of a self-resolving paradox.
In my current situation, I would create a communications 'time capsule' with a beacon set to activate during the first starfleet survey of the planet. Without giving too many details, it would provide the stardate and circumstances of the stranding of my vessel and crew in the past, a warning about the time portal, and the suggestion that steps be taken to prevent this occurence from happening. Without being specific, starfleet command could simply order all traffic somewhere away from the coordinates where the portal opens on the stardate in question.
So in the end, the timeline is changed slightly but with the most minimal impact, and no ships are caught in the time portal and stranded in the past. In the 'original' timeline where the crew is stranded, we concentrate on surviving as best as we are able on the planet, knowing that either the timeline is irrevocably changed (or becomes a branch timeline), or that it will 'wink out' (like Yesterday's Enterprise) and never happen at all once starfleet recovers the time capsule.
Plus, I hate temportal mechanics.