RE: How to increase the D365 MPOS product scanning speed.
The performance of the scale unit can depend on lots of factors like Server Sizing(processor cores/RAM), Disk Performance(Disl IOPS), no. of cores, edition of SQL, no. of clients connected, Size of item masters, no. of active price lines, Promotions, number of items in a cart, etc. It is difficult to recommend a sizing. If you are using SQL Express for DB, I recommend testing with Standard /Enterprise editions.
When you are working in a supermarket, or a department store kind of store where the average lines in a transaction are more than 20, I would recommend the discount calculation to be done manually at the end before checking out.

You could also try enabling features related to pricing like "Improved pricing computation performance by using flattened discount tables" : https://learn.microsoft.com/en-us/dynamics365-release-plan/2021wave2/commerce/dynamics365-commerce/improved-pricing-computation-performance-using-flattened-discount-tables
Also, try optimizing the "Price and Discounts" parameter to match your requirements. If you have lots of expired promotions or prices, enable the retention days to make sure that all unwanted data from price/discount tables are purged.

Enable Channel DB Clean up jobs from Retail Scheduler parameters.

Finally, sit with your POS technical consultant, run SQL Activity Monitor/ profiler and web monitoring tools to find any bottlenecks and optimize as required.