First off, almost every massage I had was for therapeutic reasons and the only item I took off (and was allowed to take off) was my shirt. Only when getting a couples massage was I almost naked (I elected to keep my underwear on). Although they all felt pleasurable to one degree or another regardless of the gender, but they were strictly professional and I was more likely to fall asleep than get sexually aroused while it was going on.
The only exception was when I was receiving one of the injury treatment massages from a woman I found attractive and while she doing my neck I reflexively looked up from the hole in the table my face was in to find her crotch just inches from my face. While I got more of a semi, than full on erection, but that was enough to concern me when she announced she was done and I could get up when I was ready. I elected to lay there a few minutes on my stomach till I deflated, especially given I was wearing fairly tight fitting jeans.
So yes, it can happen and it's not so much that one gets an erection, but how one deals with it. Since I consider such massages professional and wouldn't want to give the wrong impression, I would do everything possible to hide any erection, however unintended, just as I did in that one instance.
While I'd obviously be far more prone to getting an unintended erection from a female, but otherwise have no preference as to the sex of the therapist. As far as who gives a better one, I found it depends on the circumstance. For a general massage or mild discomfort I do somewhat lean towards the finer touch of most women; but if a firmer treatment for serious or localized pain is needed, than I have found most men having a stronger grip and can go deeper into the muscle and thus they can prove more effective.