I've been working with doing something similar to this, but using a zebra barcode scanner. I have a simple app that is set up with a textbox and a timer. The timer runs on repeat every second. I used an if statement similar to this in the OnTimerEnd property of the timer:
If(Textbox1.Text <> "", //If textbox isn't empty
Patch(DataSource, Defaults(DataSource), {Data: Textbox1.Text}); //Sends data to a data source
Reset(Textbox1); //Empties the textbox for new data
SetFocus(Textbox1); //Puts cursor back into textbox1
); //Does nothing if the textbox is empty
The app runs on a raspberry pi so that we will not need to use up a whole PC for one constantly-running app.
The scanner is connected to the raspberry pi and acts as a keyboard, so when it scans something, it types the data into the textbox. The timer sends the data to a data source using the above code, and that's really it. Nothing too complicated. This process wouldn't require a raspberry pi; you can use anything that can run Power Apps.
Check out this website for how to get your scale to act as a keyboard:
https://www.instructables.com/How-to-Connect-an-Electronic-Balance-or-Scale-to-a/