The question needs be expressed in categorical terms.
The category of topology $TOP$ consists of objects and morphisms being topological spaces and continuous maps, respectively. Homology and homotopy represent basically the connectivity of topological spaces.
So what is the category of probability ?
I think there's an obvious idea of objects being mm-spaces $(X,d,\mu)$ and morphisms being continuous pushforwards $f:(X,d,\mu) \to (Y,d_Y, \nu)$ if $f\# \mu = \nu$. But I've encountered two problems with this category: 1) the hom-sets are too large! 2) canonical geometric maps in the hom-sets are not represented by continuous maps pushingforward the source measure $\mu$ to the target $\nu$. So topology cannot immediately enter because topology is foremost restricted to continuous maps.
The basic idea is developed in Gromov's "huge" lectures https://www.ihes.fr/~gromov/wp-content/uploads/2018/08/probability-huge-Lecture-Nov-2014.pdf and category of reductions between finite probability spaces. This is developed more formally and briefly in his ``entropy" papers https://www.ihes.fr/~gromov/wp-content/uploads/2018/08/structre-serch-entropy-july5-2012.pdf
Now I add the next step. In the Gromov lectures the idea is expressed that probability needs to be based on functors. In my research I found the need to construct contravariant functors. Contrast this with Gromov's definition (pp.54 in "probability-huge-lecture" linked above) of probability spaces as covariant functors $\mathscr{X} : \mathscr{P} \to Sets$ where $\mathscr{P}$ is Gromov's category of finite probability spaces (where morphisms are given by reductions, i.e. pushforwards/ transports).
The 'persistent-homology' can be extended much further with optimal transportation theory. My thesis was in studying the topology of $c$-optimal transports, which is essentially the topology of the graphs of $c$-optimal transports between different source target measure spaces $(X,d,\mu)$, $(Y,d',\nu)$ relative to cost functions $c: X \times Y \to \mathbb{R}$ satisfying some standard assumptions ($C^2$, proper, Twist, etc.). My special focus was studying the topology of singularities of $c$-optimal transports between spaces of unequal dimension. The key idea was the construction and topological study of contravariant functors $$Z=Z(\mu, \nu, c): 2^Y \to 2^X, ~~~Z(Y'):=\cap_{y\in Y'} \partial^c \psi(y),$$ where $\psi:Y\to \mathbb{R} \cup \{-\infty \}$ is $c$-concave potential $\psi^{cc}=\psi$ solving Kantorovich's dual max program.
Topology enters by studying the images $Z(Y'') \to Z(Y')$ of canonical inclusions $Y' \hookrightarrow Y''$, and understanding the conditions such that the images $Z(Y'') \to Z(Y')$ are homotopy-isomorphisms. This was main subject developed in my thesis (2019), and available on my github https://github.com/jhmartel/Thesis2019
The basic fact is that the contravariant functor (and i emphasize the contravariance because it's critical!) is nontrivial whenever there is persistent singularity. And that persistent singularity has very well-defined topology, and which topology often represents the ambient total space.
All the topology of the transports depends on the topology of the cost $c$. And this is basically where metric structure is defined. I studied repulsive costs (groundstates of electron-only electrostatic configurations) rather than attractive costs like $c=d^2/2$ (which represents groundstates of oppositely-charged electro static configurations). This is because the topology of the Kantorovich's contravariant functor $Z$, is basically homotopic to the source space $X$ for repulsive costs, and homotopic to the target space $Y$ for attractive costs when the ratio $\mu[X] / \nu[Y]\geq 1$ is sufficiently small (close to $1^+$).
I will comment that the normalized probability measures are very limiting to understanding the topology of optimal transports. For example, when studying transport between spaces of distinct dimension, and my favorite example is $Y=\partial X$, it's better to not limit yourself to simultaneous probability measures on the source and target. Consider that the disk has area $\pi r^2$ and the boundary has length $2\pi r$, and cannot be geometrically renormalized to probability measures. That's why I exclusively study semicouplings $\pi \in \mathscr{M}_{\geq 0} (X\times Y)$ satisfying $proj_Y \# \pi = \nu$ and $proj_X \# X \leq \mu$.
Final parting shot:
Notice how $2^Y:=Hom_{TOP}(Y,2)$ and $2^X$ are "cubical". But the support and image of $Z: 2^Y \to 2^X$ needs not be cubical, and have their own noncubical connectivity properties depending on source and target measures w.r.t. cost $c(x,y)$, and specifically the $c$-subdifferentials $\partial^c \psi(y)$ of $c$-concave potentials $\psi: Y \to \mathbb{R} \cup\{-\infty\}$. The functor $Z$ represents "intersection of fibres" of nontopological retracts $r: X \to Y$. I.e. there is a pseudo-formula $Z(Y')\approx "\cap_{y\in Y'} r^{-1}(y)"$ Retracts do not exist in $TOP$, but they DO exist in optimal transport Monge-Kantorovich setting by the rule $r(x):=\partial^c \psi^c(x)$. Notice that the pseudoformula $``\cap_{y\in Y'}r^{-1}(y)"$ would be trivial (the functor supported on singletons) if $r$ was continuous, which it is not.
The following paper got me started in this direction and appreciating more the role of semicouplings asymmetry in the optimal transport programs. Huesmann, Martin, and Karl-Theodor Sturm. "Optimal transport from Lebesgue to Poisson." The Annals of Probability 41.4 (2013).