First of all, be prepared to pay a one-way drop fee for dropping a Croatian car in Slovenia when you depart. It may not be that bad if picking up the car in Zagreb - check into it, though, so you aren't surprised. (Try Sixt for rental cars for multi-country.) Compare prices for renting the car in Zagreb and returning it there vs. returning to Ljubljana, to see what the extra cost will be.
(You could avoid this fee by flying into/out of Zagreb or Ljubljana - but it may not be a big cost. I'd want to know though.)
Opatija was worth about an hour of exploring, but it wasn't my kind of place: too much conspicuous wealth. I much preferred charming little Rovinj, which is small enough to explore in just a few hours but a lovely place to come back to at night after you are out exploring. You could detour between Rovinj and Piran by stopping in a few of the hill towns on the way. FYI, some borders between Croatia and Slovenia down't allow non-EU passport holders to use them; be careful if relying on your phone or a GPS to guide you to a small border crossing.
Kobarid isn't really "in the Julian Alps." It's down in the Soca Valley. It has a well-regarded WW I museum, but that may not interest you if you aren't into museums. Otherwise, it's a tiny town, not especially charming but nice enough. There's a nice waterfall close to the town. I spent a night there (I wanted to see the museum) and it's not a bad place to stop but I wouldn't go out of my way to stop there.
Unless you want some sort of back-to-nature experience - a tourist farm or something - there's really no reason to stay in the Julian Alps area. Most people drive up (coming from Kobarid) up through the mountains and down the Vrsic Pass for the views and the drive. (The drive down the Vrsic Pass consists of many hairpin turns, but I have no trouble driving it; I went the other direction,, starting in Bled.) Driving from Piran through Kobarid and looping around (clockwise up into the mountains down the Vrsic Pass) and on to Bled is very easy to do as a day drive, without rushing. This drive is well described in the Rick Steves Croatia/Slovenia book.
Trieste is well regarded by some, but I found it just another noisy Italian city (it's not a tiny town). It's worth a stop for sure if you are passing through, but I'm not sure I would go out of my way to see it. Some would. You'll have to read more about it and see if it's your thing. You'll probably have no issue driving the car into italy (not a controlled border between Italy and Slovenia; you might drive into Italy without realizing it). FYI, if you rent the car in Croatia, you MUST by a vignette driving pass at the Slovenian border!!! Otherwise, you risk a steep fine if caught driving on the highway without it. You can buy a vignette at a gas station at the border maybe on either side.
I would spend a little more time in some of the towns between Bled, Ljubljana, and Logarska Dolina. A couple of beautiful towns in the area include Skofja Loka, Radovljica (which is close to Bled). The drive between Skofja Loka and Bled, up through the mountains via Jamnik and Kropa is really beautiful - I highly recommend it as a scenic detour. On the way Logarska Dolina (which I haven't seen yet), you might stop in the town of Kamnik (which I did visit) another charming little town - not much to see, just a pretty town.