I think it is possible using CSS, JS and HTML to do that. I don't know if it is compatible with bs4_book()current structure though. It may require a new or adapted HTML template.
Making a format that include all these features is really interesting and it would be great to have this. Currently there are pieces accross packages (tufte, distill...) only.
Why there is not yet ? it is a matter of compatibility between feature but I believe this should be possible.
If you look more into it, please share you findings!