Heat the base: In a medium saucepan, whisk together the almond milk, cocoa powder, sweetener, salt, and espresso powder (if using). Warm over medium heat, whisking often, until the mixture steams and the sweetener dissolves.
Do not boil.
Temper the yolks: In a separate bowl, whisk the egg yolks until smooth. Slowly ladle in about 1/2 cup of the warm chocolate mixture while whisking constantly. Repeat with another 1/2 cup to gently raise the temperature of the yolks.
Thicken the custard: Pour the tempered yolk mixture back into the saucepan.
Cook over low to medium-low heat, stirring constantly with a spatula, until the custard thickens slightly and coats the back of the spoon, about 5–7 minutes. Keep it below a simmer to avoid scrambling.
Add chocolate and cream: Remove from heat. Add the chopped unsweetened chocolate and let it sit for 1 minute.
Whisk until fully melted and smooth. Stir in the heavy cream and vanilla.
Chill completely: Pour the mixture into a clean bowl. Press plastic wrap directly on the surface to prevent a skin.
Refrigerate until fully cold, at least 4 hours or overnight. A colder base makes better ice cream.
Churn (ice cream maker method): Churn the chilled base in your ice cream maker according to the manufacturer’s instructions, usually 20–25 minutes. Add any mix-ins during the last 2 minutes of churning.
Transfer to a lidded container and freeze 2–4 hours to firm up.
No-churn method: Whip the chilled base with a hand mixer until slightly airy, 2–3 minutes. Fold in any mix-ins. Pour into a loaf pan, cover tightly, and freeze 4–6 hours, stirring once or twice during the first 2 hours for a softer, more even texture.
Serve: Let the ice cream sit at room temperature for 5–10 minutes before scooping.
Keto ice creams firm up more in the freezer, so a short rest helps it scoop beautifully.