I am not a fan of gluing to sheet rock, especially painted. The sheer strength of the paint to the sheet rock, and the sheet rock facing to the gypsum is not very high, and even less so in a humid environment. You will also might destroy the sheet rock if you decide to remove the board in the future.
[ edited: What Jack said.] The electrical wires will be run along the side of the stud. If they are routed through the stud, the hole should be in the center of the stud ( at least 1 1/4" from the inside edge. or covered with a metal plate). I used the term "should" because it depends somewhat on the age of the structure and the veracity of your local code enforcement program.
One option is to positively identify the stud center by using a small drill bit set to penetrate just beyond the sheet rock thickness and drilling several holes across the stud location to define the edges. If you hit metal, relocate above or below. I used this method when hanging my fire extinguisher in my garage, with it being 18" above a GFI outlet, although I mounted the extinguisher bracket directly to the sheet rock.
Another option is to bridge between adjacent studs (if they show no electrical)with your mounting board.
Option three is to use toggle bolts through the sheet rock to mount the board, installing them at least 6" away from the stud.
The extinguisher size also is a factor. A typical "5lb" ABC extinguisher weighs in about 9 lbs. A 2/12 gal water extinguisher weighs in about 30 lbs. Using adhesive or toggle bolts, you also need to add the weight of the board.
jmtcw