Even in July, the crowds were manageable if you planned your day.
The crowds go up the Grand Canal in the morning to St Mark’s and back to the cruise ship docks and train station in the late afternoon. Between The Rialto bridge and St Marks was crowded from about 10 until maybe 5. Then it starts to thin out.
So avoid the traffic, go opposite the day trip flow, and explore the area around St Marks early or later. Do something away from the main drag during the day.
One of our favorite experiences was our Grand Canal ride leaving the train station area around 6 pm headed to St Marks (nearly empty vaporetto, as opposed to the jammed ones going the other way). We had a lovely evening in the near-empty Piazza — music, snacks, chill atmosphere. Just wonderful.
Have fun, don’t worry about the crowds. Just be smart about where you go when and you’ll be fine.
ETA: be sure to get a timed entry ticket to avoid the lines for the cathedral — pretty sure you can even get them online on your phone as you are standing in the Piazza, so you don’t need to plan too far ahead.