Multiple flows / backend frontend influencing one value

I m managing a big ERP system, where we have multiple revenue and cost fields and elements. Currently we have a repeating group that displays the margin based on search performed calculating the sum of both and then subtracting one from another.
I do it this way because I have seen situations when:

More than one workflow doing sum of elements that are changed (like do the operation mentioned above) there can be a situation when 2 changes run at the same moment and it will result in data being incorrect.
Example : at the same time - costs can be adjusted on multiple ingredients of the main cost aggregator plus at the same time 2 users edit another part that impacts the main element.

Is the proper solution - to reduce the searches and keep system clean - to setup the update of sum of revenues and costs - as a Data Trigger?