Eat the ticket don't even waste time in court. You need to look at this like a layer would.
Were you going above the speed limit before the accident?
Has the vehicle been modified in any way that would affect it's stopping distance?
How long have you been awake before the accident?
The list goes on.

Basically if you had enough stopping distance you would not have hit them. It does not matter what the people in front of you do. You need to constantly think about if that car suddenly stops if you will I be able to without incident.

People blow tires, hit walls, side swipe each other, loose stuff from trailers, cross the median/center line, fall asleep and so on. With very few exceptions if you rear end someone your at fault.
I drive a truck where if there is anything that could have been done to avoid the idiot hitting me I am at fault despite what the idiot may do. Even if I establish I was doing everything to avoid the damage they will go back checking records, times, speeds, road conditions, and so on looking for a reason to say "if you were not here this would not have happened and there for you are at fault".

The only way you can get out of a rear end collision is what I stated above. If the driver you hit was uninsured you can claim that "they are at fault despite what you may have done due to them not on the road legally. If they were not on the road you would not have hit them". You will need to prove without a doubt that if they were not on the road no damage would have occurred.

Look at it this way, you were smart enough to put full coverage on it before the incident, you are getting a ticket but things could have been worse, no one is claiming injuries or suing you(yet), you can find a tj easily or upgrade to a jk getting better mileage.

Your coming off as a crybaby whining about how the cop treated you and what the car in the middle said. Stuff happens your not perfect, fess up you messed up, pay the ticket, and hop in a new ride.