Can sour cherries be used in a semi-stable bar?
I will have to preface a bit with bad news about food safety, but bear with me, not all is lost :)
As per standard food safety: &quot;semi-stable&quot; does not exist, at all, for anything. You either have &quot;shelf stable&quot; or &quot;needs refrigeration&quot;. And the idea of having baked cherries being shelf stable is impossible. We have a writeup on food safety for beginners, it will likely clear a lot of things up for you: https://cooking.stackexchange.com/tags/food-safety/info.
Your own answer starts going into the right direction, but is not completely there. You can turn the cherries into a jam, but to be shelf stable, you will have to use a 1:1 jam recipe (1 kg sugar per 1 kg cherries), the lower-sugar-ratio recipes preferred nowadays are only shelf stable after canning, and as soon as you open the jar, need refrigeration. Once you have made the jam, you will find out that it is not &quot;solidified&quot;, it's smeary. To  prevent a mess during transportation, you will have to take a gasket-seal box along on your bike (are you willing to do glycogen-depleting tours with saddle bags?), and eating will require taking a break and doing cleanup.
The second recipe also produces &quot;bars&quot; in the &quot;homemade baking&quot; sense, not in the &quot;convenience food&quot; sense. They will not be shelf stable, and they will be prone to squishing and falling apart. You will need the same procedure as above to transport and eat them.
The only way I see this working is by drying the cherries - and by drying I don't mean such superficial measures as baking a bar twice, I mean using a proper dehydration technique. You have two options.

You start with whole, fresh cherries. You dry them (you can research recipes for this, don't just stick them in the oven and hope for the best) and the result is raisin-like, but intensely sour (if you want it sweet, choose a recipe with sufficient added sugar). Once you have the dry cherries, you can eat them on the bike one-by-one, or make granola bars with them, or bake them into some kind of scones/muffins/bars. Note that the third option requires you to use significanly more dough than cherries, else it will fall apart, so granola may be the way to go.

You make fruit leather. For this, you can start with the frozen cherries you have, or also use fresh ones. You have to juice them and dry the juice. When made properly (again, research recipes!) it is shelf stable and very bike-friendly. Also, it is very friendly to &quot;using it up&quot; projects, since a large amount of cherries produces a small volume of fruit leather. Here too, you may have to persevere through a few learning attempts when using an oven, but if all goes well and you decide to make it your go-to snack, an investment in a dehydrator would be advisable.