Processing a block of pixel from a texture

Not a full answer but thought i would chime in on an approach.

So averaging an area is just shifting the texture around by a number of pixels and averaging it together. You just need to only sample each shifted area in the range you need each time. This could be possible in nodes but i think would lead to a lot of nested Material Functions and large node networks and result in a very set number of rows/columns.

You may want to set this up in the Custom Node where you can do loops, etc in pure shader code but this itself has limitations especially for multiplatform.