There are a lot of ways to remove the difficult screw, application of heat is in the algorithm somewhere, depending on the firearm and the risk to harm of said firearm versus trashing the fastener. My general Rule-of-Thumb is risk trashing the least expensive part OR the part that is most easily replaceable, as they are not necessarily the same!
I don't like torch flames as a first line heat approach due to the risk of discoloration of surrounding metal surfaces or wood finishes. For this OP instance I would suggest a modified soldering iron tip that matches the screw head dimensions (mostly size #6-10 for firearms). All heat applications will transfer / conduct heat to adjacent metals depending on their heat "sink" capacity. Just a simple video to demonstrate, without heat heat sink effects, how a soldering gun can melt solder with a similar heat degradation point of red loctite, at a fastener distance which is commonly encountered.
Instead of direct soldering iron-fastener heat application and intermediary hex driver fastener bit e.g. hex, torx, phillips head , can be secured to the fastener and THEN heat the intermediary bit to reduce risk of heat damage to adjacent hardware.....of course it takes greater patience for the heat transfer to occur, that's when you ask of Job's divine intervention.
www.dropbox.com
PSA - it's not easy to apply heat and document with support hand iPhone. Also, the magnet holding the fastener is a handy manner in which to apply a liquid fastener adhesive of choice, either aerobic / anaerobic requirements prior to installation.