I was able knit the document as pasted above:

I had to comment out the lines:
bibliography: reference.bib
csl: university-of-gothenburg-apa-swedish-legislations.csl
As I do not have those files. I also had to add library(jtools) to your list for the theme_apa() function.
This suggests that there is something else in your .Rmd file that is triggering this latex error. I have gotten this error before, but I forget what it was caused by or how I fixed it.
One thing that caught my eye is:
biblio-style: apa-like
I generally just type this as apalike -- something to try for sure, but I don't anticipate this fixing the problem.
Another thing that could cause this problem, is the header-includes part. I generally use:
header-includes:
- \usepackage{booktabs}
- \usepackage{longtable}
Rather than omitting the hypens as you have done. I would try this too.
If neither of these solutions fix your problem, I suggest trying to dive into the log file to find which line specifically is causing your problem. You could then paste a more complete .Rmd file that users can reproduce the error from.