Air Fryer Hard-Boiled Eggs

Making the perfect hard-boiled egg has perplexed me for years.   My old method was to add the eggs to a pan, fill it with water, and bring the water to a boil.  As soon as the water goes to a rapid boil, turn off the burner and let the water cool off over time.  It works well, but the eggs were difficult to peel.   Annoyingly difficult.