Try giving the parent div a class, like sticky container and then target the sticky within that. This should apply the styling to the last sticky child in the div.
Example
<div class="list">
<div class="container">
<div class="sticky">Sticky1</div>
<div class="sticky">Sticky2</div>
<div class="sticky">Sticky3</div>
</div>
</div>
and then the css would be
.list {
.container {
.sticky:last-child { box-shadow: 0 6px 4px -4px #888888; }
}
}
Solution using Javascript.
Not quite sure on the css side, but if using javascript you can look to style the last sticky in the parent div like so:
const listWrapper = document.getElementById('sticky-container')
const stickyList = listWrapper.getElementsByClassName('sticky')
const lastSticky = listWrapper.getElementsByClassName('sticky')[stickyList.length -1]
lastSticky.style.boxShadow = '0 6px 4px -4px #888888'