Since you seem to be in Madrid only as a convenience, how about going to Toledo either at the beginning or the end of the trip? The ideas below assume you must spend your last night in Madrid because of a morning flight home. If your flight is later, you could go to MAD straight from Toledo (worst case - train/bus strikes and have to pay for a taxi to the airport). Toledo is much better as an overnight so you have some morning and evening time without the daytrippers, instead of being them.
Going at the beginning - short train ride, but arriving zonked. If you do that, you could either stay 1N and take a late train to Cordoba (just because it's a shorter train ride than Sevilla), or stay 2N and take an early train. It doesn't really matter which order you go to Cordoba and Sevilla, in the end, same travel time.
Going at the end, you have your choice of taking an early train to Toledo, and/or a late train to Madrid, so you can decide pretty much last minute where you want to spend more hours. While tickets often sell out on the day, if you buy a day or 2 ahead, you shouldn't have a problem. You can also store your bags at Atocha and just take a small overnight bag to Toledo.
Just to pile on, how about skipping Ronda and taking a little more time to enjoy the other towns? That would allow you to daytrip to Jerez/Cadiz or even Jerez/Arcos from Sevilla. OR add a night to Toledo.