The Wall of Flesh is very strong but Skeletron Prime is stronger still !!!
To defeat him you’ll want to think like a Paladin, try to get the most defense possible.
With a great bow at least cobalt, a demon scythe and max mana, and an amazing sword I use the Muramasa and Night’s Edge but Excalibur would do.
Try ranged attacks till later into the battle,then use a quick and powerful sword.
Also use healing potions or greater healing potions if available.
To get a better chance of winning stay near spawn and try teleporting when in danger.
Hope this helps 🙂