isn't there a solution to export gif frames directly from AE?
No. The only functionality that ever did this was via Quicktime and it was never particularly good and controllable, which ultimately is the point: Due to how AE works, it has no means of producing exact colors for palette-based formats. Only PS can do that. As for the other thing - get familiar with the mosaic effect and adjustment effects as well as the draft layer quality setting.
I remember doing GIFs in image ready that came with my photoshop 5.5. Sorry dont know if if was capable of doing the animation you require. I know that early of photoshop had no stroked shapes.
Snapping to pixels isn't the problem. You can easily handle that by simply turning a layer to draft quality. Just make sure that the Render Settings in the output module are also set to draft.
Render a QuickTime Animation Codec (use the default lossless preset in the output module) with the render settings set to draft. Then open that QT movie in Photoshop and use Export (legacy or the new Export) and export your animated GIF.
You can set the GIF to repeat and do all kinds of other things. 25 fps is a lot of fps for a gif. Most are half that or less. When you set up your comp set up the FPS you want and Photoshop should properly interpret it. When I create an animated gif in AE I use 1 frame for each new frame in the animation and don't worry about the time. Then in Photoshop you can set the duration for each frame. For example I've made quite a few animated gif's that are used as ad banners. I'll start with one frame to show the logo, then 5 frames for the transition to the product photo, then one frame of the product, then five frames to dissolve back to the logo. When I open up the gif in Photoshop I'll set the duration of the first frame at 10 seconds, then leave the next five at their default, then set the duration of the product frame as 10 seconds, then leave the transition back to the logo at it's default. When I export the gif I'll tell it to repeat and I get 10 seconds of logo, a nice dissolve and ten seconds of product and a nice dissolve and 10 seconds of logo for ever. The file size of the logo is less than 1/50 the size it would be if fI were to repeat the static frames at 15 fps. There are quite a few tutorials that are pretty good on how to create an animated gif in Photoshop and how to import movies. Trying to do it all in AE is a usually a waste of time.