If you want to determine if an object 'escapes' from velocity, yes, you should compare orbital velocity and escape velocity. For a two body problem, infinite radius is available for orbiting when you keep your spacecraft below escape velocity.
However, space is not a two body place; it is full of bodies and you should consider all objects. Ideally, you should use momentum and energy equations to make simulations in space. However, if you want a simpler approach which you always orbit the 'strongest' planet nearby — this is what I understood from your question — the best approach would be using Newton's law of gravitation.
$F=\frac{GMm}{R^2}$ where $G$ is gravitational constant, $M$ is mass of the planet, $m$ is mass of your orbiter and $R$ is the distance between them.
To make maps of influences you can use $F=\frac{M}{R^2}$ for a planet because $G$ and $m$ are the same for all planets. You can make sphere-of-influence spheres with this formula. The active planet is the one which has strongest $F$ at given point, so spacecraft will orbit around it.