I have done dozens of these types of installs, over the years, and none of the displays have failed as a result of excessive heat. You simply have to plan the install correctly.
The first thing you do is run the fireplace for awhile and see what happens, put your hand on the wall where the TV will go, do you feel any excessive heat on your hand? Does the wall get very warm? What you typically discover is that fireplaces are extremely inefficient, most of the heat goes up the chimney, further there is always a certain amount of draft because the fireplace is pulling air out of the room, and so whatever radiates up towards the TV generally drafts back down.
Some fireplaces get very hot externally, however, if you have a six inch or greater mantel depth below the panel the radiant heat will deflect away. The bigger issue is the cabling going to the TV.
If it is a gas fireplace, there will usually be a stud frame cavity with drywall surrounding the self contained gas unit inside. Even though the unit has a hot fire within it the cavity will not get all that hot as the design of the fire place transfers the majority of the heat of the double walled pipe and of course out the front of the display side.
However, some of these fireplaces were designed to have a blower; problem is that cheep builders don’t always want to pay for that, so you will either see the wiring for a blower, or an empty outlet, but no fan. This can be bad as this will present a very hot problem, wherein I usually require the customer purchase the specified fan, which is a good thing since they will now be able to take advantage of all that lost heat in the wintertime.
The wiring can be run inside this cavity, just so long as it is safely clear of the fireplace housing, check specific codes in your area for the distance.
AC appliance power & extension cords can never be run through walls !!! This is a big code no no. You must install a legitimate power plug at the TV location. Which if you are on a crawl is a lot simpler than you might think, wherefore it should not cost all that much to have an electrician do this for you.
If you look inside the gas fireplace cavity you will probably see romex nailed along the studs inside this tells you that the electrician was not very concerned with the space getting to hot for his wiring. However if there is a thermal concern, you can run your video cabling for the sake of safety and future upgrades through flexible metallic conduit, making sure that it is safely secured to the inside of the cavity away form the heat source.
Brick fire places require that you chisel out a line of mortar one half brick deep from the center out to the side where the cabling will be fished in from a wall or a cabinet, completely removing one single brick in the center behind the TV. Some people bury Romex but we use flexible MC Cable 14/2 or 12/2 + ground where applicable coupled to a single gang mortar outlet box. It is really a benefit if your receiver up-converts to HDMI so that you only have to run the one cable plus a control system wire along with the MC electrical cable through the mortar channel.
Using a small roto hammer with a small bit and some patience is the best method to make the channel, mortar drills out pretty easy, however it is a very messy process so a good shop vac masking and drops is required. We usually have one guy hold the shop vac hose right next to the roto hammer bit to suck up the dust as we go. Make sure you press all the cabling as far back into the channel as possible without gouging it. Re-mortar over the cabling with the correct mortar color, yes there are different colors of sand, some are greyer some are whiter, take some of the mortar you removed to wherever you are buying your mortar from and show the expert.
I use tapcon concrete anchors with fender washers to hold the TV mounting plate to the wall; these screws are very strong if installed properly. I map out the bracket placement screw holes with blue tape first just to make double sure I am not going to make a mistakes.
There are a lot of variables, but installing a TV over a fireplace is not really all that big a deal.
Be safe!
David