There is a notion of a CAT(0) square complex (or more generally cube complex). This has the desired property: hyperplanes will be trees, and any two points are separated by a hyperplane.
More generally there’s a concept of a special cube complex, which Dani Wise has promoted as a higher-dimensional version of graphs higher-dimensional version of graphs in From Riches to Raags: 3-Manifolds, Right-Angled Artin Groups, and Cubical Geometry (see quote below). CAT(0) cube complexes are just the simply connected special cube complexes (like trees are simply-connected graphs). This is probably also much more restrictive than your condition. However, a theorem of Sageev, in theoremEnds of Sageevgroup pairs and non-positively curved cube complexes, implies that a space with sufficiently many hyperplanes (such as 2-complexes in which every pair of points is separated by a properly embedded tree) may be “cubulated” (embedded into a CAT(0) cube complex), so in some sense these might be the right category to consider.
Special cube complexes are introduced as cube complexes whose immersed hyperplanes behave in an organized way and avoid various forms of self-intersetions. CAT(0) cube complexes are high-dimensional generalizations of trees, and likewise, from a certain viewpoint, special cube complexes play a role as high-dimensional “generalized graphs”. In particular they allow us to build (finite) covering spaces quite freely, and admit natural ….