Spray a large casserole dish with cooking spray (or 6 mini casserole dishes). Add butter to a pan over medium heat. Add onion, season with salt, stir, and cook until just softened, about 5 minutes Add garlic and cook until fragrant, about 1 minute. Add the thyme and set the onion mixture to the side.
Whisk eggs, half-and-half, milk, greek yogurt, mustard, hot sauce, and salt in a large bowl until evenly combined. Arrange half of the bread in bottom of prepared dish. Sprinkle with 1 cup of the Gruyere and half each of onion mix and ham. Pour egg mixture over top.
Refrigerate for 2 hours or overnight.
When ready to bake, heat oven to 350 and bake for about 20-25 minutes. Remove from the oven and sprinkle parmesan on top and bake for another 15 minutes until puffed and beginning to brown.