Foucault seemed to think it was, if not proper behaviour, then at least not-unproper. That is a moral judgement.
To suggest that Foucault was above the entire concept of morals as I understand you to do, well I can't agree on that and I don't think he would either. Of course he was trying to be a moral authority, remember that this whole thing was about him (and others) attempting to legalize sexual relations with children. If he did not think himself an authority, on what merit would he petition? And barring that, it is clear that he was and maybe is an authority, because here we are half a century later or so still discussing his position.
His experiences does not excuse him in my eyes. Neither does it impact to the slightest degree the truth-value of his position on this issue, nor of his philosophy overall.