Is there a suitable definition in categories for a closed continuous function in topology?

Let $\mathcal{C}$ be a category with products and coproducts. Let us denote by $1$ the terminal object. We assume that $\hom(1,-) : \mathcal{C} \to \mathsf{Set}$ is faithful. The motivating example is $\mathcal{C}=\mathsf{Top}$.

Definition. A global element $a$ of an object $A$ is a morphism $a : 1 \to A$.

Definition. An object $A$ is called discrete if every map of global elements $\hom(1,A) \to \hom(1,B)$ is induced by a morphism $A \to B$. An object $A$ is called codiscrete if every map of global elements $\hom(1,B) \to \hom(1,A)$ is induced by a morphism $B \to A$.

Definition. A Sierpinski object $S$ is a an object which has two global elements $x,y$ and which is neither discrete nor codiscrete.

In the case of $\mathcal{C}=\mathsf{Top}$, these elements $x,y$ are distinguished by the property that $\{y\}$ is open, but $\{x\}$ is not. Of course there is also another, isomorphic Sierpinski space with the roles of $x,y$ exchanged. But for us only the first is the correct one.

Now the task is to distinguish these two Sierpinski objects from each other, for general $\mathcal{C}$. The correct $S$ has, for every set $I$, a morphism $$\cup : \prod_{i \in I} S \to S$$ such that a global element of $\prod_{i \in I} S$, i.e. an $I$-indexed tuple consisting of $x$ and $y$, is mapped to $y$ if and only if there is at least one $y$ in the tuple. And the correct $S$ has a map $$\cap : \prod_{i \in I} S \to S$$ such that only the constant tuple $y$ is mapped to $y$ only then $I$ is finite.

I don't claim that such an object $S$ exists for every $\mathcal{C}$, but that this is a property in the language of categories which may or not be satisfied by $\mathcal{C}$, and it certainly holds for $\mathcal{C}=\mathsf{Top}$.

After having characterized the correct Sierpinski object $S$ as well its two global elements $x,y$, we are able to define open and closed subobjects, motivated by the fact that the Sierpinski space classifies open subsets in the case of $\mathsf{Top}$.

Definition. An open subobject of an object $A$ is a morphism $U \to A$ which fits into a pullback diagram

$$\begin{array}{c} U & \rightarrow & 1 \\ \downarrow &&~~ \downarrow y \\ A & \rightarrow & S. \end{array}$$

If we take $x : 1 \to S$, we obtain the notion of a closed subobject of $A$. Note that we can define the union of an arbitrary family of open subjects, as well as finite intersections, using the operators $\cup,\cap$ from above.

Definition. Let $f : A \to B$ be a morphism in $\mathcal{C}$. It is called a closed morphism (resp. open morphism) if for every closed (open) subobject $Z \to A$ the composition $Z \to A \to B$ has an image factorization $Z \to Z' \to B$ for some closed (open) subobject $Z' \to B$.

Let me mention that with these definitions it is easy to obtain the rigidity of the category of topological spaces $\mathsf{Top}$. Roughly, this means that the "concrete structure" of the objects can be recovered in the language of category theory. The underlying set of $A$ is just $\hom(1,A)$, and its topology consists of the images of $\hom(1,U) \to \hom(1,A)$ for open subobjects $U \to A$.

The definitions may also be applied to the category of posets $\mathcal{C}=\mathsf{Pos}$, where $x$ and $y$ can not be distinguished from each other. Therefore the automorphism class group of $\mathsf{Pos}$ is $\mathbb{Z}/2$, the automorphism mapping $(X,<)$ to $(X,>)$.

Edit: Freyd had already shown rigidity in his book on abelian categories, Chapter I, Exercise G. He offers a surprisingly simple distinction between the "correct" and the "wrong" Sierpinski object: If every point of a space is open, this space is discrete. This is not the case if every point is closed.