Being scrollable in both directions is an issue, so maybe using Scroll Driven Animation to warn when a container is overflowing in both direction is possible?
See Robin Rendle's post based on Bram.Us experimentation.
Only Chromium-based browsers for now (05/2024). But hey, who knows?