I'm not so experienced. I've had my snake for less than a year. The videos I saw online recommended enclosures that were at least as long as their total length. My breeder warned that an enclosure that is too large can dysregulate the snake. My snake (spotted python) at the time was perhaps 30cm and he said stick with the 40x30x30. I did this for a while but after some time, I noticed my snake was almost standing up and bumping their head against the lid. They had grown maybe 5cm by then.
I decided to get a 60x45x45 enclosure, I checked in with the breeder and they were strongly against it as they thought it was too large... but I went ahead anyway coz it didn't make any sense that a snake would panic just because its in a larger space. It made more sense that they might not like spaces that were open and barren. So I filled the space with real plants, rocks, tree logs and a couple hides to make sure they feel snug and safe. As for my snake, they're loving exploring all corners and doing just great! I think if you ensure they have plenty of cover from above and around, you can go bigger.