(In the absence of feedback on this site I've also posted the question at https://mathoverflow.net/q/343762)
I think I know the answer but can't prove it.
Assume that Y is a Hausdorff space and firstly that $p, q$ are simple (= continuous, injective) paths mapping $I = [0, 1] \to Y$. The idea that they represent the same trace or curve at least requires that that the images $p(I) = q(I)$ and that $p(0) = q(0) = y_1; p(1) = q(1) = y_2$
Then it follows that $p, q$ are homeomorphisms onto $p(I) = q(I)$, that there exists $\phi: I \to I$ defined by $\phi(x) = q^{-1}(p(x))$, a homeomorphism, and then $p = q \circ \phi$.
If $p, q$ are not simple, then they are not injective and the above argument fails. They are however equivalent to regular paths (see for example https://math.stackexchange.com/q/3317511 ), i.e. paths which are not constant on any non-trivial closed interval but which may self-intersect. So, if I could answer the question for regular paths that would do it.
It isn't immediately obvious what would define regular paths $p, q$ as being the same curve. One could define them to be the same based on the existence of $\phi$ as above, which clearly encompasses the simple case, but this is not intuitively satisfying.
I would like to show that a definition along the lines that they represent the same curve if they map $I$ to the same points in Y in the same sequence leads to an if and only if condition for the existence of $\phi$. If the curve has a finite number of self-intersections I can envisage this would follow by considering it as piece-wise simple, but what of the more general case ?
To formailise the concept of representing the same points in the same sequence one might require a bijection between their graphs $\psi: \{ (s, p(s)) \} \to \{ (t, q(t)) \}$ , though I don't see how to enforce sequence with this, and haven't seen it result in the necessary $\phi$.
Suggestions would be appreciated.
A later note....
In the case of two simple paths $p, q$ where there is a clearly defined bijection $\phi$, one can define having the "same points in the same sequence" saying that for two points $y_a = p(s_a), y_b = p(s_b)$ with $s_b > s_a$ then $y_a = q(\phi(s_a)), y_b = q(\phi(s_b))$ and $\phi(s_b) > \phi(s_a)$.
The most I can find to say in the general case is that given $y_a = p(s_a), y_b = p(s_b)$ with $s_b > s_a$ then there exist (at least) a pair $t_a, t_b$ with $y_a = q(t_a), y_b = q(t_b)$ and $t_b > t_a$. Given that the paths can pass through points repeatedly, there could also be $t_{b2} < t_{a2}$ with $y_a = q(t_{a2}), y_b = q(t_{b2})$.
In a more geometrical sense, two paths would have the "same points in the same sequence" if they trace the same curve in space - start and end points, direction, and repeating loops and intersections the same number of times.
Clearly the existence of such a function $\phi$ is a sufficient condition to then call two paths the same, but is it necessary, i.e. can its existence be inferred from preservation of sequence ?
Let $p, q:I \to X$ be two regular paths, i.e. the functions are not constant on any non-trivial closed interval but may self-intersect any (even uncountable) number of times. While the points in their images are not necessarily unique, the points in their graphs are and in fact are identifiable by the domain value. In other words there are bijections
$\psi_p: I \to \mathscr \Gamma_p = \{(s, p(s)): s \in I\}$ given by $\psi_p(s) = (s, p(s))$ and
$\psi_q: I \to \mathscr \Gamma_q = \{(t, q(t)): t \in I\}$ given by $\psi_q(t) = (t, q(t))$.
To formalize the idea that $p, q$ represent the same points of a curve, extend the idea of a simple (injective) path (that they have the same image) to say instead that the same points in the image occur the same (perhaps uncountable) number of times, i.e. that there is a bijection
$\phi: \Gamma_p \to \Gamma_q$ such that $\phi((s, p(s))) = (t, q(t))$ with $p(s) = q(t)$.
Here, the reason for considering regular paths becomes apparent. For if $x_0 \in X$ and $p^{-1}(x_0)$ is a non-trivial interval $[a, b]$ while $q^{-1}(x_0) = c$, a single point, then no such bijection is possible.
(But $p^{-1}(x_0)$ and $q^{-1}(x_0)$ could be an equal (even infinite) number of points).
Then $\pi = \psi_q^{-1} \circ \phi \circ \psi_p: I \to I$ is a bijection.
There are of course any number of bijections $I \to I$, but this is one with the property that
$\pi(s) = \psi_q^{-1} \circ \phi \circ \psi_p(s) $ .......(A)
$ = \psi_q^{-1} \circ \phi (s, p(s))$
$ = \psi_q^{-1} (t, q(t))$ with $q(t) = p(s)$ by the property of $\phi$
$= t$ with $q(t) = p(s)$
I.e. $p(s) = q(\pi(s))$
Now consider the ordering of the points and formalize this by saying that the points in the graph inherit the order of their domain value. E.g. the order of points in $\Gamma_p = \{(s, p(s)): s \in I\}$ corresponds to $s$ so $s_2 > s_1 \iff $ $(s_2, p(s_2))$ is after $(s_1, p(s_1))$.
Then to say that the points in $\Gamma_q$ are in the same order requires that among bijections $\Gamma_p \to \Gamma_q$ we can choose a $\phi$ such that $s_2 > s_1 \iff (s_2, p(s_2)) > (s_1, p(s_1)) \iff \phi((s_2, p(s_2)) ) > \phi((s_1, p(s_1))) $.
From (A) we have $\pi(s) = \psi_q^{-1} \circ \phi \circ \psi_p(s) $ so that $\psi_q \circ\pi \circ \psi_p^{-1} = \phi $, and then
$\phi((s, p(s)) ) = \psi_q \circ\pi \circ \psi_p^{-1}((s, p(s)) ) = \psi_q \circ\pi (s) =(\pi (s), q(\pi (s))) $
So, $s_2 > s_1 \iff (s_2, p(s_2)) > (s_1, p(s_1)) \iff \phi((s_2, p(s_2)) ) > \phi((s_1, p(s_1))) $. $\iff (\pi (s_2), q(\pi (s_2))) > (\pi (s_1), q(\pi (s_1))) \iff \pi (s_2) > \pi (s_1)$
I.e. $s_2 > s_1 \iff \pi (s_2) > \pi (s_1)$ .
So if two regular paths $p, q$ represent the same points the same number of times in the same sequence, there exists $\pi; I \to I $ a strictly increasing bijection and therefore continuous and therefore a homeomorphism and $p(s) = q(\pi(s))$.