Check in datasheets of particular device, what is maximum dissipation power and under what conditions (@25C temp).
If need more power consider adequate paralleling of devices to get more power, add big and efficient heatsink, .....
Use heatsink with smaller thermal resistance or even water cooling,... active cooling with fans,... add fan to heatisink,....
What is working time needed (few seconds or few hours) ?
TO247 about 310W per device, but manufacturer explain and give product characteristics in datasheet, check it.