I don't know what your animation looks like, but I think you are using the wrong tool. Web animations should be mostly code. The browser turns the code into pixels.
After Effects is designed to create pixels and render movies. If you start pushing on the underlying Afeter Effects code with a bulldozer and then beat on it with a sledgehammer, some of the vector information in a comp can be turned into code using a few 3rd party tools.
If you want to produce web animations, you should look at Adobe Animate. That is what Animate is designed to do. If you must stick with After Effects, you must convert all of your source files to plugin-compatible files. That isn't easy to do. Adobe Animate can easily embed movies in a web browser by mimicking a media player. The file size and bandwidth requirements are about the same as playing a video from YouTube. As long as you can deal with the bandwidth and file size, you should be able to do most of what you described using Animate.