The overheating issue has nothing to do with the box or sub.
With an aftermarket sub rated at 4ohms (the stock one is 8 ohms), you are doubling the output of the stock amplifier. The lower impedence and resulting increased output causes the amp to heat up more. Anyone in the industry will tell you that mounting an amp upsidedown on the top of the trunk is a very poor idea. It doesn't allow the fins to ventilate and any heat it generates stays right up there at the top of the trunk.
If you want to fix your overheating issue, try removing the amp from the enclosure and mounting it somwhere else. Some common places are the back side of the rear seats, a corner of the trunk, or under the front seat.