This question is inspired by this (still unanswered) MO-post.
A function $f:X\to Y$ between topological spaces is called strongly rigid if every continuous self-map $h:X\to X$ with $f\circ h=f$ is the identity map of $X$.
It is clear that every injective function is strongly rigid.
Problem. Let $C_{sr}(I^n)$ be the set of strongly rigid real-valued continuous functions on the $n$-dimensional cube $I^n=[0,1]^n$. Is $C_{sr}(I^n)$ comeager in the Banach space $C(I^n)$ of all continuous real-valued functions on $I^n$? What is the answer to this problem for $n=1$? $n=2$?