Boni seconds were called into life for when there were no actual timegaps, to my understanding. It makes no sense in case of ex aequo to give the advantage based on placings instead of actual differences. As if Evenepoel finishing 76th tomorrow in a peloton sprint and Roglic 89th, being what sets them apart.
It makes just as much sense than your proposal. Bonus seconds are there to encourage and award the fight for good stage placings, it would be pretty bizarre of those seconds were some sort of second-rank time that didn't quite count.
But yeah, the count-back is weird too, I'm not saying that is a perfect solution.