Preheat oven to 375º Fahrenheit. Have two pieces of parchment about 18 inches long, a rolling pin, and a baking sheet set aside. An insulated baking sheet works best for this recipe, but other baking sheets will work as well.
Heat a large skillet over medium heat, add the butter. When the butter stops foaming, add the onions. Cook onions, stirring occasionally until edges are brown and onions have caramelized
Add garlic to the skillet. Cook for one minute, stirring constantly. Pour balsamic vinegar over the onions and cook until almost completely evaporated.
Add prosciutto to the skillet, separating the thin slices as you put them in the skillet. Cook while stirring for about 1 minute. Stir in basil, then remove skillet from heat. Taste and adjust seasoning with salt and pepper. Prosciutto is salty already, so the addition of salt will probably not be necessary.
Prepare a double boiler and bring water in the lower part of the double boiler to a simmer. In the top part of the double boiler, add the mozzarella cheese, the almond flour, and the salt. Stir to evenly distribute.
Place the top part of the double boiler containing the almond flour and mozzarella mixture over the bottom part with the simmering water. Heat the mixture, stirring frequently, until the cheese melts and the mixture becomes a dough-like ball. Be careful not to burn yourself with steam escaping from the bottom part of the double boiler. I use a silicone mitt to hold the bowl while I stir.
Transfer the mozzarella dough to a piece of parchment paper. Knead it several times to incorporate any stray almond flour into the dough and completely mix the cheese and the almond flour. Pat the dough into an oval shape. Cover the dough with a second piece of parchment and roll out into an oblong shape about 14 inches by 9 inches. While rolling the dough out, you may need to straighten the top parchment, then flip the dough over and straighten the bottom parchment. This prevents wrinkles in the dough.
Spread the filling along the middle third of the dough, being careful to leave about one third of the dough on both sides. Sprinkle ½ cup of the parmesan cheese over the filling.
Cut approximate 1” wide strips down the sides going to where the filling starts. Make sure there is an equal number of strips on each side. Crisscross the strips as shown. Before you get to the end, fold the bottom over the filling and cross the last few strips over top. This gives the loaf a neat and tidy end.
Break the egg into a small bowl. Whisk lightly and brush over the bread. (You will not use the entire egg.) Sprinkle the loaf with reserved parmesan cheese and a pinch of freshly ground black pepper on top.
Using the parchment the bread is already on, slide bread onto a baking sheet. Bake in preheated oven for 18-22 minutes or until it is golden brown. Let bread cool 5 minutes on the baking sheet, then transfer it to a cutting board using the parchment. Gently remove parchment from underneath, if desired. Tearing the parchment will make this process easier. Slice and serve hot with olive oil for dipping if desired.