Where should I place them as a result of the mishap?
According to the 5e Teleport spell, they take 3d10 force damage and you reroll on the table to see where they land... The teleport spell is very clear on how it works...
If you throw 'mishap' again, another 3d10 force damage and keep rerolling.
Besides that, it's either on target, a similar area or off target.
A similar area: you teleport 500 yards off a fortress, just not the stone giant fortress. I would say, be creative. It can be a beholder fortress or a kobold fortress. Heck it could be a fortress made of cheese on the moon!
Off target: 1-100% off target of distance traveled (1d10x1d10%), it averages out at about 30%. I would take the destination and roll a d12 to determine direction and then move them the rolled amount of distance off the target.
And while I think that the latrine is extremely funny! It isn't at all how teleport works, you as the DM need to have a certain level of consistency, only make things up when there are no actual rules for something. In this case there are. As a player I roll with the punches, but I would find it annoying that the DM couldn't be bothered to read the rules for the game he's DMing... At that point, why bother with the rules yourself... If things work differently in your world, inform the players beforehand.
If this kills the PCs, so be it! The game becomes a lot less thrilling when there are no consequences.
Unless the distance is relatively minor and/or you throw horribly low, chances are small that they land in the middle of an Stone Giant encampment.
Source:
https://www.dndbeyond.com/spells/2275-teleport (PHB 2014)
https://www.dndbeyond.com/spells/2619163-teleport (PHB 2024)