The boarding group system is a de facto lottery, so Disney should simply acknowledge that and switch to an actual lottery.
Guests tap in and sign up for a boarding group immediately, but do not receive a BG until official park opening. All BGs at official opening are assigned by lottery. Some win, some lose, but it isn't a 30 second scramble to pound the servers to get a BG. Slow tech and confused guests have 45 minutes prior to park opening to get their stuff together.
Any BG's (the last ones) not assigned at opening are there for the taking for the guests signing up after the lottery.
This is exactly the same as the current system, but with less stress.