The ticket structure for Grad Night has changed since 2017. There are now 3 kinds of tickets, at different price points, with 3 different kinds of park access. This new structure was tested for the first time this year and seems to have helped alleviate the massive crowding that you experienced. The Grad Night thread linked above should have been updated with this information.
You make a good point about the middle school groups. The end of the academic year is a time for many school groups of all ages to visit DLR. So you will see large groups of students, ranging from about 5th-6th grade up to 12th, roaming through the parks from May through June.