I always thought it was really bad writing when every other week the holodeck was responsible for almost destroying the ship, especially on Voyager.
If I was a Starfleet Captain the first thing I would do is have the holodecks physically removed from my ship.
The next thing I would do is tell my tactical officer to raise shields and fire at will in any combat situation. Starfleet protocol seems to be to sit nose to nose with an enemy vessel and let them pound your shields to about 50 percent before contemplating a counter attack.
All that being said, I still love Star Trek. I would rather see Kirk, Spock, and McCoy sing row, row, row your boat, Or the TNG cast playing poker a thousand times than watch 1 CGI space battle.
That is why I like Star Wars, but don't love it.