A large amount of vibration energy is dissipated in the secondary suspension systems of railway freight wagons, which can be harvested as renewable power supplies to serve more smart devices for onboard applications. This paper explores the vibration energy harvesting potential of freight wagons and deals with the systematic design issues of energy-regenerative shock absorbers (ERSAs). By considering the ERSA force interaction and realistic track irregularity, a vehicle-track coupled model is established to predict a more accurate vibration response. The parameter sensibility analysis reveals that the operation speed, vehicle load, and track irregularity are the most critical factors that can significantly affect the power generation performance. In addition, vibration energy harvesting potential assessment is conducted on American, German, and Chinese track spectrums and several field-measured freight lines, indicating an average power potential ranging from 33 to 960 W per absorber with a full-loaded freight wagon running at 90 km/h. Finally, a systematic design approach for ERSAs is proposed based on the prior feasibility assessment, a hybrid Grey Wolf Optimization and Particle Swarm Optimization (GWO-PSO) algorithm, and the vehicle-ERSA coupled model. The digital twin of an ERSA has been established and validated by a series of experimental tests. Taking the average power as the objective and setting the suspension vibration velocity, maximum generator rotation velocity, and maximum ERSA force as constraints, the optimized ERSA exhibits an output power of 63 W and 20.22% shock absorption on the secondary suspension. Meanwhile, the GWO-PSO has demonstrated an enhanced exploration ability than the conventional GWO in dealing with the constrained optimization problem of the ERSA design.