Preheat the oven to 350 degrees F.
Add 2 quarts water and a generous pinch of salt to a Dutch oven and bring to a boil over high heat. Meanwhile, prepare an ice bath by combining 4 cups ice and 4 cups water in a large bowl. Add the green beans to the boiling water and cook just until crisp-tender and bright green, 2 to 3 minutes. Drain the beans and immediately plunge them into the ice bath. When cool, drain again and set aside.
Melt the butter in the Dutch oven over medium heat. When the bubbles have subsided, whisk in the flour until it is free of lumps. Cook until the mixture is slightly golden and smells of toasted nuts, about 2 minutes. Slowly pour in the milk and cream, whisking constantly. Add the thyme and continue whisking until the mixture is smooth. Cook, whisking occasionally, until the sauce is thick enough to coat the back of a spoon, about 8 minutes. Season with salt and pepper to taste.
Meanwhile, heat the olive oil in a large sauté pan over medium-high heat until shimmering. Add the mushrooms, spreading them in an even layer; do not season or stir the mushrooms. Cook until golden brown on one side, about 3 to 4 minutes. Stir to flip the mushrooms, then continue cooking until browned all over, another 3 minutes. Add the brandy, if using, and cook until reduced by half, about 1 minute. Season with pepper and then scrape the mushrooms into the pot with the cream sauce.
Add the green beans to the mushroom cream sauce. Fold in 1 cup of the fried onions. Transfer the mixture to a 2-quart baking dish.
Bake until the casserole is hot and bubbling around the edges, 30 to 35 minutes. Top with the butter crackers and the remaining 1/2 cup fried onions. Bake for another 5 minutes, just to brown the topping.