Yes, both are good ideas for refining the penetration system.
The mathematical basis for accuracy loss/spread as defined by distance from a penetrated obstacle might be (250 - Distance) / 125 = Spread Multiplier. I selected 250 as this is the maximum possible range for most weapons, and 125 as the divisor to limit the max/min range to 2-0. This spread multiplier would 'stack' with the base penalty for attempting to shoot at a target you do not have LoS to through an obstacle. For example:
Base spread with an aimed assault rifle shot is 1/1. Trying to shoot an alien through a wall would increase the spread by a factor of 2, to 2/2. Then, because the distance between you and that wall is 4, the spread would be multiplied again by 1.968 ((250 - 4) / 125) to 3.936/3.936. If dynamic spread is possible though, spread should change by a given amount after contact with an obstacle, 2 let's say, if fixed.
As for varying types of ammunition being better able to penetrate, perhaps a set of coefficients could be used to determine the specifics of penetration. For example, a 'power' coefficient of 2 for a round would mean that round has twice its regular power for the purposes of penetration, while an 'efficiency' coefficient of 0.75 for a round would mean that only 75% of an obstacle's absorption value applies for the purposes of reducing that round's damage.
Alternatively, both coefficients might conceivably be merged into one, this singular value determining 'power' for the purposes of penetration, while its inverse determines how much of the absoption value is deducted.