Line an 8x8-inch baking pan with parchment paper, leaving some overhang on two sides for easy removal.
Add the apple cider to a large, heavy-bottomed saucepan. Bring to a simmer over medium heat and cook until reduced to ½ cup, about 25 to 40 minutes. The cider should look syrupy. Watch it closely near the end to prevent scorching.
Pour the reduced cider into a measuring cup and set aside. If there are any dark spots in the bottom of the pan, wipe them out.
To the same saucepan, add the butter, heavy cream, granulated sugar, brown sugar, corn syrup, and reduced cider.
Cook over medium heat, stirring until the butter is melted and the sugars have dissolved.
Attach a candy thermometer to the saucepan. Stop stirring and continue cooking until the caramel reaches 246°F to 248°F. For a firmer caramel, cook it to 250°F. Keep a close eye on it, especially during the last few degrees, as the temperature can rise quickly.
Remove the pan from the heat. Stir in the vanilla, apple pie spice, and kosher salt until smooth.
Carefully pour the caramel into the prepared pan. Avoid scraping any dark bits from the bottom of the saucepan into the pan.
Let the caramel cool at room temperature for about 20 minutes. Then refrigerate for about 2 hours, or until firm enough to cut.
Lift the caramel out of the pan using the parchment paper. If using, sprinkle the top with flaky sea salt.
Cut the caramel into squares using a sharp knife lightly coated with butter. Wrap each caramel individually in wax paper.