There's quite a difference between eight days and twelve. With eight days I might well spend all my time in Austria (given that it's a must for you). With twelve days, and assuming you don't have tons of different places you want to see in Austria, you could either see part of Czechia or part of Slovenia. Which I would choose would depend partly on my Austrian targets. If you'll mainly be in Vienna, that argues for Czechia. If your Austrian itinerary will include Graz, that makes Slovenia a practical option. If your Austrian interests lie in the west, I'm not sure which of the two countries would be easiest to reach. I'd be looking at the Deutsche Bahn website to see how I could avoid spending too much time in transit.
If I had just four or perhaps five days days available outside Austria, I'd be more comfortable with adding on Slovenia, because you could see Ljubljana and Bled in that amount of time. I bussed to Bled and to both caves (on different trips); you might be able to squeeze in one of the caves. Four or five days in Czechia is barely enough for Prague; it's a much larger country.
Edited to add: From Ljubljana back to Stuttgart is over eight hours by train. The trip from Prague would be a bit shorter but probably requires a bus/train combo. An all-Austria trip is looking more attractive to me.