SMS dit: Optimal processes in irreversible thermodynamics and microeconomics