This topic has been discussed many times here:
https://www.uphillathlete.com/forums/topic-tag/muscular-endurance/ read some of these and you’ll find answers.
Stairs beat machines because you have to lift your body against gravity on stairs. But your 10 flights probably takes less than 5 minutes. so this would be best for high intensity ME workouts like these: https://www.uphillathlete.com/muscular-endurance-me-workout-water-carries/
For longer workouts where you want to remain in a continuous aerobic zone then the machine will be better. Or the elevator can work too.