The best way to avoid the long lines is not to try to leave any park right after the fireworks. On our last trip we just sat on a bench across from the castle as the throngs stormed down Main Street to the exits. After about twenty minutes we walked down a very quiet Main Street to the equally quiet bus stop area.
Just sit, walk around, get a snack, shop or window shop. Take it easy for about twenty minutes or so and the bulk of the people will be gone.