From my experience, this is exactly it: if your rotor is bent at all in any place, there is more likelihood of squeal. Does not necessarily mean you have to use a tool to straighten it (for me it doesn’t even really work that well), but what helps is if I perfectly align the caliper so that the bent part doesn’t touch the pads at all.
If it does mine also does like a ringing sound if I move the bike in a certain way (took me some time to figure out what that was). Like if I angle the front wheel to fit into an elevator it would do that.
When I properly align the caliper it doesn’t do that sound and the squealing is much less frequent if at all on many rides.