you have 2 options:
the first is the eat the elephant approach. use fileopen and fileread to read in 1 line at a time. If multiple lines make up a single transaction, then read more lines until you have one transaction. do your thing and save to the database, then read in the next set of records. if you add in a yield() you can allow some feedback to the user that it is working.
the 2nd option is to basically build a service. Upload the file to your server, then run your PB application either with command line arguments, pooling, or use something like https://topwizprogramming.com/topwizweb.html to run your import objects. or you can use the c# converter in PB2019 to build it out as a full web service.
We use the first approach for customers to import a lot of files (both PS web and client/server). We will be transitioning to the 2nd option in the future so that a user doesn't have to wait around for it to process.