I have a gap between brick framing that holds my microwave oven and oven and the rear dry wall. This is due to house shifting over the years. The former owner filled it will ugly rubbery filler that cracked and fell mostly out. I have removed that and cleaned up the gap. Now the hard part. I want this to look as as aesthetically pleasing as possible as it's in my kitchen. The gap is about 5.5 inches deep before I hit a wood frame that is probably holding the ovens. The width of the gap varies from 1/4 to 1" inch. In a perfect world it would be nice to fill with mortar so it looks like it never separated from the wall. Not sure how they would hold up over time. I guess an alternative would be to fill with something and paint it the wall color so it looks seamless. Due to the ovens being there I am concerned about using any flammable filler. Looking for suggestions on how to make this look it's best. Appreciate your input! Thanks!
Use a spray expanding foam filler in the larger gaps then shape the foam so it is slightly recessed. Then use a paintable flexible caulk. Paint it if you want.
The foam will provide a better backing for the caulk.
Hopefully the drywall edges are all supported. If any of those gaps is just a layer of drywall with a large void behind that not even expanding foam can reasonably fill, you may need to repair that .
The brick should not be getting hot. Not at all. If it's getting so hot you think it might ignite things, stop using the oven immediately. Figure out what's wrong. For reference it is normal to install wall ovens in painted wood cabinets without expecting any heat damage to the wood or even the paint.