Preheat the oven to 350°F (180°C). Line a 9 x 13-inch baking pan with parchment paper, leaving some overhang on the sides. Arrange the graham crackers or digestive biscuits in a single layer, covering the bottom of the pan.
Melt the butter and brown sugar in a skillet or saucepan over medium heat, stirring until well combined.
Add the chopped pecans, heavy cream, salt, and vanilla extract. Cook for a few more minutes, stirring until everything is well combined.
Remove from the heat and let the mixture cool slightly. Gradually stir a small amount of the warm filling into the beaten egg, then pour it back into the saucepan and stir until fully incorporated.
Spread the pecan filling evenly over the crackers, making sure to cover the entire surface.
Bake for 10–15 minutes, until the filling is bubbly and golden brown. It will still be soft but will firm up as it cools.
Remove from the oven and let cool slightly. Sprinkle with flaky salt, if desired, while the filling is still soft.
Let cool completely, then lift the bark out of the pan using the parchment paper. Cut or break into pieces before serving.