Basically any documentclass I've used so far has
sectioning commands such as
\subsection etc. which provide an optional argument which is meant for the title designed for the ToC, whereas the mandatory is used in the document text as heading.
This was introduced to limit the length of ToC entries, but it can be used to abbreviate headings for the ToC as well.
An automatic 'shortening' requires more work.