This is literally like you dropping a dollar on the ground.
Read this shit. When Q says we have it all he means it. Predictive algorithms and years of planning. How can Q predict future events? This is how. A sentient machine carefully fed with select information on events can predict anything.
https://www.theverge.com/2019/7/31/20746926/sentient-national-reconnaissance-office-spy-satellites-artificial-intelligence-ai