On it's own, I can't imagine so.
However I would think straining hundreds or thousands of time on a ride vs a few dozen squats for a set has a much bigger potential for injury.
I'd also add it's not uncommon to see riders with their bikes unadjusted for their size, e.g. they might be in an already weird position with their seatpost too low.