Overheating is typically caused by issues related to the cooling system:
* Low coolant levels: This is the most common cause.
* Faulty thermostat: A stuck-closed thermostat prevents coolant from circulating properly.
* Radiator issues: Leaks, clogged passages, or a failing radiator fan.
* Water pump failure: The water pump isn't circulating coolant.
* Head gasket failure: This allows coolant to mix with oil or escape.
While an extremely severe engine problem (like the catastrophic failure mentioned above due to unchecked detonation) *could* lead to overheating as a secondary effect, it's far more likely that the overheating is due to a cooling system problem. The increased load of towing a camper would exacerbate any pre-existing cooling system issues, making it more likely to overheat.
In short: Focus your attention on the cooling system first. A disconnected knock sensor should be addressed, as it could cause other engine problems, but it's not the primary suspect for overheating, especially while towing.