A calculation that has a machine-precision number in it generally results in a machine-precision result.
In particular, if expr is machine precision, then N[expr, 5000] does not change it. The precision has been lost and cannot be recovered.
NIntegrate[] without a WorkingPrecision option uses machine precision.
N[expr] uses machine precision, so input[v] results in a machine-precision expression.
Your range table is machine precision.
All this means that most, and maybe all, of your N[..., 5000] calls have no effect.
For high-precision results, I mainly use exact input (e.g. Table[x, {x, 0, 1, 1/10}] or Range[0, 1, 1/10]) and WorkingPrecision (e.g. WorkingPrecision -> 5000) in functions that have such an option. Beware, such a high setting for NIntegrate[] will probably take a long time to compute. I usually use N[expr, 5000] on exact expressions, since N[] generally cannot increase the precision of a result; and it won't change machine precision to arbitrary precision.