If you use LTN, you should not manage the train limits manually. LTN will ensure that not too many trains are sent to a stop (you can control this with a signal).
This is one of the areas where the code base shows its age. The "max trains" logic was implemented before there was a train limit per stop and uses its own calculations on how many trains to send to a stop. For a reimplementation, the code would probably use the train limit API.