Let's say something had technology so far advanced we could only perceive it as magic - our electronic brains could easily be hacked from a distance.

All the advanced race would need to do is to prevent short/long term memory creation of certain things. Just set a rule to prevent caching of certain patterns, bob's your uncle they could live amongst us in peace.

But of course a hallucinogenic could circumvent those hacks but fundamentally altering memory generation and perception. So in theory the aliens could be really tiny little humanoids living amongst us and we're constantly adjusting to not crush them, but we just don't remember.

SCP anti-memetics division.