Even if temple prostitutes were completely voluntary, it still wouldn’t solve these underlying issues. When discussing rape with rapists, it isn’t about sex, it is about raping someone. Sex isn’t going to sate the urge to commit the act of rape. Are there people out there that may not have raped someone if they had access to sex? Sure, but those are edge cases. Also I think OP is misidentifying the lashing out of horny men, like incels, to be about sex alone. Sure, it may put a bandaid on the situation, for them, for a bit. However, the underlying issue is that they are lonely, have no intimate companionship, and have to no access to that form of relationship. Getting their dicks wet might cool them off a bit, but there will still be these communities of angry, dejected, men who do not have that type of relationship.
According to a lot of people? No.