I love the Balkans, but when you're using public transportation outside Slovenia and Croatia, every day is an adventure whether you want it to be or not. You have some extremely long travel legs there, because buses and (rare) trains through the Balkans move at a very slow pace--in my experience, about 30 mph (50 km/hr). You are hopping between interesting places, skipping nearby spots that some think are better. I would visit fewer countries, spend less time on buses/trains and actually see more. There are a lot of young people in those countries (I haven't been to Macedonia or recently to Turkey) who speak English; I'd want to give myself some time to connect with them.
Buy border-crossing bus tickets as soon as you know when you want to travel; they can fill up.
Budapest-Ljubljana looks like about 9 hours on either bus or train. Ljubljana is a very attractive city where I think you'd enjoy spending a couple of days (lots of young people hanging out), plus there are lovely nearby spots like Lake Bled, Lake Bohinj, and the Vintgar Gorge. All accessible by bus, though probably not on one day.
Ljubjlana-Split will likely be over 8 hours by bus, via Zagreb as you noted. It's a shame not to spend some time in Zagreb, which has a very nice historic district, an active street scene, and a bunch of interesting museums. In addition, the Plitvice Lakes National Park is one of the prettiest spots in Europe (if weather is decent). To see it at its best, though, it's important to spend the night before your visit near the park so you can beat the day-trippers onto the paths. You can get to Plitvice from Zagreb by public bus and then go on to Split the next day.
Sarajevo to Kotor may take about 7 hours by bus. Do you not care about seeing Dubrovnik? That would be worth a day. Montenegro has a lot of lovely spots, both small cities (Cetinje, Herceg-Novi, Ulcinj, Budva) and countryside. It's a shame to blow through the country in about one day. If it's a day when Kotor has a monster cruise ship in port, it will not be a top-flight experience for you.
That Kotor-Ohrid trip sounds like quite a slog. The route may take you through Albania, which I've heard is fascinating but have never visited. How often do you expect to get to that part of Europe? Why not spend a bit of time seeing Albania? The one bus connection that pops up on Balkan Viator is for a 7:38 PM departure and 5:03 AM arrival. Sounds miserable, so I'd prefer to break the trip into two manageable chunks. NOTE: I found a TripAdvisor post warning against using the Balkan Viator website because its data is often many years old.
The difficulty of getting reliable bus schedule info before you arrive in your anticipated departure city is just another reason why this part of Europe doesn't work very well for the sort of trip you are planning. You may well encounter buses that do not run daily and find yourself marooned somewhere. Seriously: On two occasions when I stopped at a local tourist office to check on a bus trip that involved a connection, the staffer picked up a phone and called the bus station in the mid-point city rather than looking for the schedule online.
I suspect you're facing another 8+ hours on the bus when you head to Sofia, which incidentally is far from the most interesting place in Bulgaria. I much, much preferred Veliko Trnovo and Plovdiv. There are also a couple of historic Black Sea towns with historic churches and something of a beach scene nearby: Sozopol and Nesebar. I absolutely would not go to Bulgaria and see only Sofia. If you're just using it as the fastest way-station en route to Istanbul, I understand that, but I'd trim the number of planned destinations and end in a city with cheap flights back to Istanbul.
Otherwise, Sofia to Istanbul will be another huge chunk of time spent on a bus. Said bus, incidentally, goes through Plovdiv, where you could spend a nice day or two if you had more time.