I want to make a gym that is completely skippable until you need all 8 gym badges. I want it to either be an considerably difficult 2nd gym if you only have one badge or if you already have 2+ then it scales to your level plus a couple. If anyone could point me in the best direction to get that done or has done it before it would help a ton.
Assuming you are using Pokemon Essentials (as you don't specify and this is technically a page for any type of game deving) this is pretty easy to make. The first part is making your gym difficult as the second gym, making it how you would any other gym. Gym badges already don't have to be gathered in order, so you don't have to anything special to make it skippable.
Scaling is a little bit more difficult, but the simplest, most methodical way to do it is to make a new event page on the same event that you put the original gym trainers/leaders, then make the battle again, but make the teams stronger. Then make it depend on a switch that is activated when you receive the third gym badge. Repeat with all other badges.
You will have to make 7 different battle versions if you do it like this, so check out the Pokemon Essentials wiki if you don't know how to make multiple battles of the same trainer.
Note, that you will need to put the event page that is determined when Self-Switch A is ON to the last page, or the new battle pages will override it.