As an ex developer, i tell You that need to overide the collection in source of your data.
Select your product by filtering and sorting on position and obtain a first array, then a second array with the sold out value. Then merge the second array in the first by adding it to the end, send it as a collection.
As a functional expert, i suggest you to do it an other way: develop a cron in magento for updating the position depending on those value (your actual position + sold out). (Position is definitely the attribute to sort product the way you want)
It will easier to develop, to update and to manage.
Hope it'll help