Units used in tests are separate to the allocation of 4 for race weekends. The FIA would need to ensure an allocation of testing engines is included in an engine contract.
I'm assuming an engine contract isn't specifically defined as just 4 per car? Rather its for "1 years supply" which will include additional required units? I.e. we don't hear about people having to fork out millions every time they take a 5th engine, so it must be included?
It would solve the 100 grid place issue as the swapping in and out of development engines would be done during tests, rather than messing with race weekends.
And with regards to the cost of testing, it needs to be weighed up against the "cost" of restricted development, financial and non financial. For example, I expect the amount McLaren would have to spend to to a bunch of post race tests in season is far less than the money they have lost through languishing at the back, still not having a title sponsor, constantly breaking down, and the damage this is all having on their (and Honda's) brand. Theres a value to testing that is not just financial.