In LOTR, they used this trick in The Return of the King
when Gandalf was riding Shadowfax into the mausoleum to rescue Faramir from the pyre. No real life horse is ever gonna get that close to a blazing fire so the actual animal and actors were at a pyre totally sans flame, while a big bonfire was built 90 degrees away from the camera and photographed through a sheet of glass to get the flames "in-camera".
The trouble with Star Trek
using such tricks is that they aren't really "free" at all. While it's true that you are saving some post-production time, setting all of that up on the day can really slow down photography on the day and television production schedules don't often have the kind of wiggle room you need to make that work.