In theory there is no limit but for practical reasons there is a limit. I did a test around this a couple of weeks ago.
Then I was able to insert 30000 lines into a journal, but when I tried to post the lines in one big batch the system broke and the posting never went through even after several attempts. This I did in BC Online. It would probably be more robust in BC on-prem.
So I think you for practical reasons should try to limit the number on lines you handle in a row to somewhere around 5000 lines and if you have larger datasets than that try to break them into smaller batches.
And for the import I would recommend you create your own xml og json import - the API's have some limitations when it comes to workloads.
And I would prefer Json import because I think that works faster than handling XML.