Rule 6: There is no rule 6!
I’ll admit that it is slightly tongue-in-cheek but the underlying statement holds true. Apart from having the finite verb in second position in main clauses and any infinitives or separable particles in last position, there is no fixed rule as to which fragment of a sentence should be where. All that we have are varying degrees of strain from almost unstrained to very strained, the latter being associated with extreme emphasis or ‘being wrong’.
There are a few minor rules. The shorter a fragment is, the more likely it is to find an unstrained position at the beginning of a sentence (‘short before long’). If a fragment is known from former parts of the speech or easily inferred, it is also likely to be closer to the beginning (‘theme before rheme’). Thus, pronouns tend to be at an earlier position than the nouns they replace.
Examples:
Ich schlage nachher{TE} mit dem Hammer{MO} zur Beruhigung{KA} den Boxsack{Akk} in meinem Zimmer.{LO}
In zwei Minuten{TE} schlage ich ihn{Akk} dazu{KA} mit dem Hammer.{MO}
Damit{MO} schlage ich ihn{Akk} nachher{TE} in meinem Zimmer{LO} zur Beruhigung.{KA}
These are just three examples. I have five moveable fragments so I can theoretically give 5! = 120 versions of the sentence of which some are better and some are emphasised and some seem too strained. In theory, all 120 are valid but there will likely be a certain number of combinations that a German won’t use.
Check out this answer for a more extensive example with less moveable fragments (but all possible positionings).