Format PNG8 ie. indexing to 255 (+ full transparency) colors before saving as PNG gives nearly 75% size reduction, but the result looks out often pixelated or there's harmful banding. That depends on used dithering settings and how complex coloring the image has. If the image has only 255 or less colors and the transparency is only full or none (=no partially transparent pixels) the result of course is perfect as is, you do not need any clever conversion methods.
Unfortunately photos have gradients, 255 colors is often not enough. Mathematical methods are developed to change image content cleverly before indexing to make a 255 colors palette possible to fit better. The changes are lossy, they cannot be taken back after saving the image. In some texts that lossy preprosessing is called "vector quantization". TinyPNG and some other PNG optimization services use it.
As a lousy replacement I have tried Selective Blur (=Smart Blur in Photoshop) to flatten complex coloring, but keeping borders and edges. It helps, but the result mostly has been worse than TinyPNG's processing
Vector quantization implementations are available as runnable software and as code for programmers. Here's some resource links:
1) An explanation of vector quantization https://www.gamasutra.com/view/feature/131499/image_compression_with_vector_.php
2) A general guide of PNG optimization. It contains several links to actual tools and vector quantization implementations.
3) Pngquant; an implementation of vector quantization https://pngquant.org
It has generous explanations, links to code downloads and links to applications and plugins which use Pngquant. Pricing = freeware, donate what you want.
There's no ready to use GIMP extension, but maybe you see some other version useful.
I have tried only SuperPNG, a Photoshop plugin. https://www.fnordware.com/superpng/
It seems to do the same as TinyPNG with equal quality. In Photoshop it appears as new format option in File > Save As -dialog. It's not a filter. I have no idea, how it could be used in other programs which allow Photoshop filter plugins. But it works with pre-CC legacy Photoshops and has 64 and 32 bit versions.