The verb "machacar" means
- tr. Golpear algo para deformarlo, aplastarlo o reducirlo a fragmentos pequeños sin llegar a triturarlo.
Which conveys "to grind, crush". It's easy to understand why it also could carry the meaning of "working hard" or to "insist".
Papá, pareces un disco rayado, llevas todo el día machacándome con lo de que limpie mi habitación.
You are right to state that it can mean "to swot up" in the context of studying, but your examples are difficult to understand.
"no puedo soportar"...
Did this mean "I can't help ...", which would be "no puedo evitar" or did you intend "I can't stand/I hate", which would be "No soporto"?
In this context you would use the reflexive form if you want to stress that you are doing hard work (like in the gym).
No veo la tele ni salgo de casa. ME estoy machancado para el examen de álgebra.
You could use the regular form to express the work being done.
Tengo que machacar todavía la mitad de ese temario. So 30 lecciones y el examen es en una semana.
When you study you put your elbows in the table, and you face the book between them (now probably people study with a laptop, so this expression may not be easy to understand, like "tirar de la cadena"). You use the expression as "hincar codos" or "hincar los codos" (from hincar, to stick your elbows in the table), but you don't say "Hincar por los codos".
The verb empollar is definitely another option, but "machacarse estudiando" conveys studying way harder than what "empollar" hints. Notice that you can also "machacarse en el gimnasio", meaning, working hard. So, it's just like a degree in the stress that you want to put in the amount of work done studying.