I’m trying to find nodes like this: Node: 1281894951 | OpenStreetMap
i.e. where there is a gate, stile or similar that is positioned at the junction of three footpaths, since a gate or stile must lie on a single way

What I think I need is:
a barrier=* node that lies on three highway=* ways
or a barrier=* node that lies on two highway=* ways, and it is a middle node (not the first or last node) of at least one of the ways

If the barrier=* node is the first or last node of both of the ways, that is fine obviously

Is is possible to write an overpass query to return this? Hope this makes sense!

i.e. where there is a gate, stile or similar that is positioned at the junction of three footpaths, since a gate or stile must lie on a single way

a gate or stile could in theory be located at the intersection of 3 ways.

A similar situation, but really not possible, are steps connected to a road (there should always be a “virtual” connection from the steps to the road center, and if it isn’t mapped with a footway most probably the steps way will be too long)