All fleets travelling into a
system pass through the
system entrance, and it is possible to set up a system blockade. This usually is done by positioning a
fleet with orders to
auto attack unwelcome
ships at the choke point.
Important caveat: For a fleet to catch another during a travel encounter, their fastest vessel must be faster than the overall speed of the attacked fleet. So if you block 3x100 with battleships, you won't stop corvettes. You want at least some small vessels. To protect from small vessel only attacks from a nearby system, you want some very fast fighters.
You don't need a
scanner level for encounters at your exact position. Since fleets must slow down traversing 3x100, world orbits or wormhole exists. No scanning ability is required for such a blockade.
A fleet will never attack
allies.