I don't think it should be allowed without a court order. Extrajudicial punishments are bad.
I do think a court order should have been issued in this case. The offender's conduct was severe enough to earn him 15 years in prison, and the risk of continuing/future harm to the victim was substantial.