Earlier quoted context omitted.
FWIW, I went for a heart checkup at the hospital recently. They were doing ECGs as normal, but they weren't doing ECGs-while-exercising due to covid risk. I think the difference between regular breathing and hard breathing due to intense exercise may be significant. My personal take on gyms would be that well ventilated ones are likely quite safe, but the most are probably not sufficiently well ventilated.
If anything I'd expect gyms to be better ventilated than offices or supermarkets. I'd imagine smelling of stale body odour isn't a great selling point for most gyms (maybe the more hardcore gyms it is?), and there's no way they are going to keep that out without decent ventilation.
I certainly wouldn't be at all surprised if gyms ended up being safer than offices and supermarkets. Offices in particular (where one typically spends hours in the same room) seem pretty unsafe to me.