How safe is it to just cram all the wires to a ceiling fan up in the canopy?
Whether it is safe depends mostly on how well the wires were protected and how much space is in the canopy. But it is not a good idea.

Wires need to be protected from being disconnected and from being shorted out. Disconnecting could happen if there is too much strain on the mechanical connection through excess force. If wires are well connected with wire nuts or their equivalent and screws on terminals, this is not common. But it happens.

Shorting is a more common problem. a sharp edge of a canopy or other hardware can cut through wire insulation and short the fixture, the box, or to a bare terminal or the ground wire. A bare ground can be pushed into an exposed screw head, creating a short.

Good practice would be to carefully fold the wires, with bare ground usually being pushed in first, to the deepest part of the box. Then fold in the rest of the wires to minimize stress on the connections when the device or canopy is pushed in. Finally, try to have the bent wires oriented so that, when the canopy is pushed up, none are sticking out over the edge of the box or canopy.

Often connections are taped over the wire nuts or bare screws to reduce the risk of disconnection or accidental short. This is a good idea especially in a crowded box.

Finally, be sure that the box itself is large enough for all the wires and devices it will contain. This means, at minimum, the size required by code, but also may mean a slightly larger box.