Set oven to 350 F. Chop onion, garlic, and jalapeño. Heat fat in a large skillet and sauté gently until soft.
In another skillet, heat another tablespoon of cooking fat. Add spices and stir for a minute or two until the fragrance releases. Stir in chicken stock until it boils.
Whisk egg yolks in a bowl large enough to hold one quart of liquid.
Add a spoonful of the hot liquid for the sauce and whisk into the egg yolks. Add another spoonful and whisk. Add a couple of spoonfuls of liquid, whisk, and keep going until all the liquid is whisked into the egg yolks.
Return all the sauce mixture to the skillet and bring back to a boil, whisking the whole time. Once it boils, it will thicken and the ingredients will incorporate. Salt and pepper to your taste.
Mix cooked vegetables, chicken, and beans if using. Spread in greased 8" square or 9x13" baking dish. Pour sauce over the top and spread as evenly as you can. Sprinkle cheese evenly over the top.
Bake 20-30 minutes at 350 F until the casserole is bubbly and the cheese is melted and toasty.
Allow to cool a bit before serving. Serve as is or add salsa, sour cream, guacamole, fermented jalapeños, etc.