Reminder that excitement and anxiety feel similar in the body. Getting pumped up for a holiday (esp one with frightening ghosts and abundance of candy), children can be unintentionally full of adrenaline and primed for an emotional crisis.
They aren't misbehaving because they are spoiled, they are flooded with neurochemistry they don't know how to manage or interpret.
Here's what you can do.
Create concrete expectations (ie. How long will you trick or treat? Specific number of candies consumed that night? Where will the candy go after? What time will the evening end?)
And then put an expectation for a meltdown on your list. That way YOU aren't disappointed when it comes. You can then give more empathy and support and help your child process all their emotions from the fun to the fear to the "it's not fairs" to the flat out exhausted.
Hope that the night goes as smoothly as it can and that whatever bumps you hit, you'll hit without shame or blame towards yourself or your kids!