Lets put it this way. If a starship had a transporter with anything like the capabilities it has in Star Trek, then therer are a whole host of things you would not need.
You wouldn't need a shuttlebay with big doors as you could just beam a shuttle and crew out into space and back again. No shuttle would have the same complexity as a human body.
But it would have much higher interatomic binding energies, so there should be a difference. It should be much harder to dematerialize the denser, stronger materials in a shuttlecraft, just as it would be much harder to burn it or vaporize it or puncture it with a weapon. Those are all about breaking the bonds between atoms and molecules, and the stronger the bonds are, the harder it is to do any of those things. Shuttlecraft hulls would be designed to withstand re-entry heat that would largely vaporize a human body. So logically they should be much harder to dematerialize with a transporter. So it would be perfectly reasonable to posit that a transporter can handle something with the material strength and density of the human body but would be unable to beam up a particularly dense or strong material like a spacecraft frame or hull.
Not to mention that a transporter that can disassemble such strong materials as easily as it can disassemble an ugly bag of mostly water has another unintended capability: It would be the ultimate disintegrator ray. It would be a weapon so potent as to render phasers and torpedoes obsolete (since it can actually work
through walls). Since the transporter on
Voyager was able to beam up shuttlecraft, that meant it had that level of destructive potential, but that was ignored.
You wouldn't need torpedo tubes. Heck you probably would not need so many shipboard corridors as you could beam within the ship.
Now, that's silly. Just because a technology exists, that doesn't mean it's automatically the best way to do something. Transporters use power, after all -- no doubt a great deal of power. It would be stupidly inefficient to waste all that power beaming people from room to room because they were too lazy just to walk a few meters. Not to mention that it would be crazy to let a Starfleet crew be that lethargic. They're military personnel who may be called to action at a moment's notice, so they need to stay physically active. This is part of why huge aircraft carriers don't have personnel elevators.
The real solution is simply not to write Kirk or whomever into that situation repeatedly. Having Kirk stay on the ship and sending a dedicated landing party would be a start.
But that wouldn't solve the problem, because no matter who beams down, it would still be necessary to contrive a way to keep them from beaming up to the ship and easily avoiding danger.
The best approach, I think, is to structure the story so that the protagonists don't
want to just beam away -- where they could easily escape but choose to stay in harm's way because they have an obligation to complete their mission, or because leaving would make things worse.
How many times have some people made cracks about Kirk always making it with the green alien chick when in fact it never actually happened...until ST09.
Aren't you forgetting Marta from "Whom Gods Destroy?"
And I think you're taking the meme too literally -- the "green alien chick" is more a synecdoche for Kirk's space-babe conquests in general.
Or Kirk driving a computer crazy with illogic. It actually happened only once in "I, Mudd" and Kirk had the entire crew helping him.
Splitting hairs. It was still his plan, his strategy.
In every other instance Kirk either used relentless logic or just flat out destroyed the computer.
Still, the underlying principle is basically the same: exploiting the computer's rigid, inflexible thinking, trapping it in a contradiction it can't resolve.