Run the file through Grbl in simulation mode first.
$C - Check gcode mode
This toggles the Grbl’s gcode parser to take all incoming blocks and process them completely, as it would in normal operation, but it does not move any of the axes, ignores dwells, and powers off the spindle and coolant. This is intended as a way to provide the user a way to check how their new G-code program fares with Grbl’s parser and monitor for any errors (and checks for soft limit violations, if enabled).
When toggled off, Grbl will perform an automatic soft-reset (^X). This is for two purposes. It simplifies the code management a bit. But, it also prevents users from starting a job when their G-code modes are not what they think they are. A system reset always gives the user a fresh, consistent start.
I’ve suggested/argued that there should at least be an option in a comm / control program to do a hash of a file, and compare it to a list of stored hashes — if not found, run the job in check mode first, then if successful, add the hash to the list.
That said, I have to ask that you not let the machine run overnight / unattended: http://docs.carbide3d.com/general-faq/machine-operating-checklist/
Have you tried running your code through a G-Code optimizer? https://www.shapeoko.com/wiki/index.php/G-Code_Utilities
or a simulator to see if there are places where it can be broken up into manageable chunks? https://www.shapeoko.com/wiki/index.php/Previewing_G-Code