Is it safe to rub WD-40 in to a brass insert on a circuit board?
Heat the screw with a soldering iron. I think this is a standard way of removing loctite, we used to do it all the time to free small SS screws in brass and steel.

The loctite will be damaged at about 150 degrees C and this sort of temperature for a short time won't damage the PCB at all.

You'll need plenty of heat, maybe 80 W, if you are going to heat up all that metal. Set the iron fairly hot as the heat will not conduct well from the tip to the screw. A blob of solder also helps, even if it doesn't stick to the screw head.

I don't know about WD40 and PCBs, but looking at your photo, if you're careful, applying it with a toothpick or needle or something, it won't get on the PCB, and certainly not near any components. Don't use the spray wand directly on the can.

If the head is destroyed, you can cut a groove in it with a Dremel or other small grinder with a thin disk blade, then use a screwdriver. The Allen key head on a countersunk screw is much too small for its thread size, so they do strip like this. But cover up the PCB with some metal or wood, for when you slip - grinders and PCBs definitely don't mix.