Make the filling. Melt the butter in a pot over medium heat. Add onion, sauté until fragrant, then add ham and flour.
Mix to coat everything with flour and sauté for a few more minutes before adding the milk, salt, pepper, and nutmeg. Mix until smooth and creamy before removing from the heat.
Prep for the croquetas. Cool the filling and transfer to a freezer safe container. Cover and freeze for 2 hours. Once the time is almost up, heat the oil and prep the breading station with a bowl for flour, a bowl for breadcrumbs, and separate bowl for the beaten eggs.
Fry the croquetas. Scoop out tablespoons of the filling, roll into balls or logs, then move through the breading station. Dip into flour, then egg, then breadcrumbs. Fry in hot oil in batches until golden brown all around.