It's a joke referring to the debris that would come out of the consoles during battles and explosions.
And if you're talking about the burn itself; they put similar 'rocks' inside their matter-antimatter reactors.
Oh that. Lol. Well, the writers aren't the cleverest and they wanted to illustrate the danger of space combat. Still, I have to agree with you that from an in-universe point of view, duranium or tritanium based hull wouldn't really produce that kind of an effect at all. But then again, these people use subspace to radically enhance the baseline energetic effects of their power sources and weapons (which is why weapons can easily go into the Teraton range)... so, is it possible that there might be some kind of a 'trade-off' here at work? It could also be why holograms replaced consoles. Much safer and probably won't blow up in your face due to a plasma overload during combat.
Somehow I doubt the script contain the line "A console explodes and Crewman Jones is pelted by rocks".
Half of well established working technologies and scientific knowledge from Trek aren't in their purview.
That's why during the TNG era, they have specialist who wrote in the technical end of the script for dialog when things got beyond the capabilities of the writers. That's the way it should be. If you need to get into technical "Nitty Gritty" and the regular Writers aren't qualified to do that, it should be left to "Technical Writers" to fill that gap. Anything that requires Domain specific knowledge should have technical Writers come in with that Domain Specific knowledge and fill in the dialog at those points. This way everything ends up making sense to the audience who understands ___ domain. Those domains can be anything from Astronomy, Biology, Engineering, Trek Specific Lore, Martial Arts, whatever. Regular writers should limit themselves to basic dialog and plot.
Wasn’t that Okuda and Sternbach, who’s real jobs were in the art department ? So specialist might be a stretch. But kudos to them for their hard work.
https://en.wikipedia.org/wiki/André_Bormanis Andre Bormanis was the Science Consultant for Star Trek. I'd expect more specialists are needed on a contractual basis if you expect to do every subject matter correctly. That bit of Authenticity helps in establishing realism.
It would be nice if that were always within the realm of possibility. But, as @Santa Kang notes, the technical aspect will be secondary to telling a good story. I'm not saying it's not part of the process, but in terms of list of priorities it will be third or fourth ahead of story and being on time.
I hope for that too. But, like historical consultants, I don't see that improving any time soon. I hope I'm wrong.