Capacitors are not supposed to generate heat, nor should the wires, so it's not an issue, but it's not best practice either. if possible, use one of these,

There is a screw nearby. No need to buy it, make one from a suitable piece of scrap plastic
Capacitors are not supposed to generate heat, nor should the wires, so it's not an issue, but it's not best practice either. if possible, use one of these,

There is a screw nearby. No need to buy it, make one from a suitable piece of scrap plastic