The only way I know of to generate motion vectors data that can be visualized in After Effects is using Re:vision FX’s Twixtor:
https://revisionfx.com/products/twixtor/after-effects/
However, it sounds like you don’t need vectors but just an approximation of the amount of movement. In which case you might try applying these effects in this order:
1) The Time Difference effect set to Absolute Difference
2) A blur effect
3) An optional Levels effect (to control the minimum amount of ‘motion’ detected)
4) The tint effect
5) The Echo effect
6) The Colorama effect
This will not produce as accurate a picture of the motion as an actual optical flow method like Twixtor but it should give an approximation.
This will only work well with a locked down camera and is also susceptible to noise in the source footage (the blur helps some).
Darby Edelen