We have been there at least five times in the past two decades. We typically end up in Cody for a few days, prior to doing the park, then stay in a fantastic RV park ( Grizzly RV) in West Yellowstone, for our park tour. This year we spent the July 4th, weekend there. IIRC, park attendance for the summer was a record, 15% higher that the old mark, for the summer of 2016.
Crowds are entirely manageable if you understand typical visitors. Mid-summer tilts toward a mix of families with young kids, and foreign visitors, mostly from Asian parts of the globe. When it comes to both demographics, it's seems that while in vacation mode, neither are early risers, and both want to be sitting at diner, and off the tourist loop, by 6PM.
This year we knew better, but got lazy, and stumbled into the west gate at 11AM, on the holiday weekend, It was a total cluster-F. The first thermal pool we came to had thousands of people, shoulder to shoulder, on the 8' wide, elevated boardwalks surrounding the pools. The parking lot was full, and there was a continuous loop of cars in the lot, playing musical chairs. Hoping to dive into an emptying spot. A 1/4 mile of the shoulder had cars illegally parked, sometimes on top of smashed poles with metal "NO PARKING" signs. We turned around and got out of the park, ASAP.
The next morning we headed back into the park at 5AM, and it was magical, the best few hours we ever spent in Yellowstone. We went for the first half hour without seeing another vehicle. The same thermal pools were totally empty, and we walked them in a stunning, and dead quiet morning mist, as the sun rose through the fog. The next five hours were blissfully quiet, and i took until 11AM or so, until it was clear that a retreat to the RV was a good idea, since the crowds were building. The other option, if it works for your schedule, is to hit the summer shoulder seasons. We have spent a huge amount of time in the mountain west, and one thing is apparent, no matter if it's the Black Hills, Moab, or Yellowstone, summers are family time, and for most families, that means the eight weeks from mid-June to mid-August. We have been at destinations where things are horribly crowded the second week of August, and pretty lonely the third. If you can push to the very edges of the seasons in late spring and early fall, it gets even better. If you do that however, be aware that weather, and closed businesses can both impact your plans. We have been in the park while getting pounded by snow, in July, and have seen tourist towns that roll up their sidewalks on October 1st.
Good luck, and have a great trip.