Part of the problem is that the higher-level concept corresponding to contracts with delegatecall isn’t the subroutine but the coroutine. So you can’t directly translate a program consisting of subroutines into a collection of contracts, even in languages like Go and Python that support coroutines. But subroutines are a subset of coroutines, so it should be doable.