You didn’t have functions in 10.2.300 but you will in K2021 (10.2.500+). Not sure what you have in your external databases, but if you make an API to pull that information into your BPM, you can continue that general idea in a function without the dependency of System.Data.SqlClient.
We tried this too and the stored procedure ran before Epicor flushed the application cache. This was a label printing function and it would be missing data the first time it was called and have it the second time. Yes, those SP queries are fast but in our case, too fast. Bart warned us about caching and reading directly from the database. Now I know why.