I saw someone prop their phone against the wall of an ice rink, on the ice. I was a bit horrified.

And that was in a rink that had only several skaters at the time.
I attaching my phone to my windshield using a suction cup mount. Works very well. At least for now. AFAICT, only suction cups that have a lever can create a strong enough vacuum to be reliable. Though I still cleaned and wet the glass and the suction cup with alcohol first - a big deal.
But people might run into a phone mounted that way, and knock it out of the phone holder, even if the suction cup held.
tstop4me's clamps sound a lot more reliable. Maybe best if you mount it in the hockey player's bench area, clamped from the outside, so that it doesn't extend into the skating area? Still not perfect, because beginning skaters sometimes put their hands on the top surface, and hockey players sometimes crash into that region. Even if you placed a tripod inside the player's bench area, someone might accidentally knock it down. But you can only do what you can.
This is probably overkill, but there are "rugged" phones, and rugged phone enclosures, which can take falls a little better. At the upper end, some have IP68 rated water resistance, IP69 dust resistance (for outdoor skating?), meet MIL-STD-810H, have extended battery lives, charge fast, have displays that work well in brightly lit areas, and work as phones in areas with poor signal strengths. But they are bigger, heavier, and may be more expensive than some phones. And of course, maybe video picture quality and frame rate matter more to you.
I wonder if there are any reasonably priced good auto-tracking cameras or camera mounts than can follow a tag that you wear... But that is even more extreme.