Place an oven rack on one of the top two shelves, then preheat the oven to 400 degrees F. Grease a 3 or 4-quart casserole dish with cooking spray, butter or olive oil.
Bring a large saucepan of salted water to a boil. Cook the asparagus, in batches if necessary, until crisp-tender, 3-4 minutes depending on the thickness of the asparagus. Drain through a colander, shaking off any excess water, then transfer to the baking dish. Toss with 1 teaspoon salt and 1/2 teaspoon pepper.
In the same pot, melt 3 tablespoons butter over medium-low heat. Whisk in the flour and cook, stirring, until the mixture develops a nutty fragrance and darkens slightly, 2-3 minutes (this is known as a roux). Whisk in the half-and-half, 1/2 teaspoon salt, and 1/4 teaspoon pepper, then increase the heat to medium-high. Whisk until thick, 4-5 minutes. Remove the sauce from the heat, then add the cheese in handfuls, whisking until smooth. Pour the sauce evenly over asparagus.
Melt the remaining 2 tablespoons butter in a small skillet, then stir in the panko and 1/2 teaspoon salt. Sprinkle over the cheese sauce.
Bake for 10 minutes, then turn on the broiler. Broil for 1-2 minutes, or until the breadcrumbs are golden brown (watch closely to make sure they don’t burn).