I am not sure if Sage can be used to find the irreducible representations of the symmetric group.
For example:
For $g = (123)$, we have $$D(a)=\begin{bmatrix}0&0&1\\ 1 & 0 & 0\\0 & 1 & 0\end{bmatrix}$$
One decomposition is the following:
$$D(a)=\begin{bmatrix}1&0&0\\ 0 & -\frac{1}{2} & -\frac{\sqrt{3}}{2}\\0 & \frac{\sqrt{3}}{2} & -\frac{1}{2}\end{bmatrix}$$
so we get two irreducible representations: $$1,\ \ \begin{bmatrix} -\frac{1}{2} & -\frac{\sqrt{3}}{2}\\ \frac{\sqrt{3}}{2} & -\frac{1}{2}\end{bmatrix}$$
The answer is not unique since we can pick another similar transformation with different basis.
Can Sage be used to do this for the general case $S_n$? If not, any software can make it?
Symmetric group representations are implemented in Sage.
See the documentation: